loop through datasourceid
-
hi mates, I have 10 sqldatasource which ID are name with dsGrid1,dsGrid2,dsGrid3 and so on. in pageload, dsGrid1.SelectParameters(0).DefaultValue = _passValue dsGrid2.SelectParameters(0).DefaultValue = _passValue dsGrid3.SelectParameters(0).DefaultValue = _passValue i don't want to code like above. i want to loop but how? thanks
C# コードMicrosoft End User 2000-2008 「「「「「「「「「「「「「「「「「「「「「「「「「「「「 The best things in life are free 」」」」」」」」」」」」」」」」」」」」」」」」」」」」
-
hi mates, I have 10 sqldatasource which ID are name with dsGrid1,dsGrid2,dsGrid3 and so on. in pageload, dsGrid1.SelectParameters(0).DefaultValue = _passValue dsGrid2.SelectParameters(0).DefaultValue = _passValue dsGrid3.SelectParameters(0).DefaultValue = _passValue i don't want to code like above. i want to loop but how? thanks
C# コードMicrosoft End User 2000-2008 「「「「「「「「「「「「「「「「「「「「「「「「「「「「 The best things in life are free 」」」」」」」」」」」」」」」」」」」」」」」」」」」」
i figure out already, here's what i did. just want to share.
For i As Integer = 1 To 10
Dim sds As SqlDataSource = CType(Page.FindControl("dsGrid" & i), SqlDataSource)
sds.SelectParameters(0).DefaultValue = _passValue
NextC# コードMicrosoft End User 2000-2008 「「「「「「「「「「「「「「「「「「「「「「「「「「「「 The best things in life are free 」」」」」」」」」」」」」」」」」」」」」」」」」」」」