急急,GridView如何刷新问题(asp.net web)
我在代码中改变了GridView的.DataSourceID属性,即用一个新的查询数据源代替原来的,,现在我怎么样才能让GridView刷新,显示新的数据呢??Dim SqlDs_1 As SqlDataSource
SqlDs_1 = New SqlDataSource
SqlDs_1.SelectCommand = "SELECT [DK_MC], [DK_WZ_S], [DK_WZ_dq], [DK_WZ_xian], [DK_WZ_bz], [DK_LX], [DK_JYLX], [DK_SPDW], [DK_SPWH], [DK_ZP_name] FROM [View_dk] WHERE ([DK_WZ_dq] = @DK_WZ_dq AND [DK_WZ_xian] = @DK_WZ_xian) ORDER BY [DK_MC], [DK_WZ_dq], [DK_WZ_xian]"
SqlDs_1.SelectParameters.Add("@DK_WZ_dq", Trim(DDL_dq.SelectedItem.Text))
SqlDs_1.SelectParameters.Add("@DK_WZ_dq", Trim(DDL_dq.SelectedItem.Text))
GV_query.DataSourceID = SqlDs_1.ID
GV_query.DataBind() --------------------编程问答-------------------- 先打DataSet里的数据清空在填充。。。
补充:.NET技术 , ASP.NET