[html] <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=10.1.2.68;Database=e-IRS;User ID=sa;Password=sa;" SelectCommand="SELECT [DetailID],[DetailDesc] FROM [e-IRS].[dbo].[View_MainCase]"></asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="Data Source=10.1.2.68;Database=e-IRS;User ID=sa;Password=sa;" SelectCommand="SELECT '-1' AS [DetailID],'Choose Sub' AS [DetailDesc] UNION SELECT [DetailID],[DetailDesc] FROM [e-IRS].[dbo].[CaseDetail] WHERE [ParentID] = @DetailID"> <SelectParameters> <asp:ControlParameter Name="DetailID" ControlID="ddMain1" PropertyName="SelectedValue" Type="Int32" DefaultValue="" /> </SelectParameters> </asp:SqlDataSource> [/html] I have two dropdownlist(ddMain1,ddSub1) I have two SqlDataSource(SqlDataSource1,SqlDataSource2) SqlDataSource1 for ddMain1 SqlDataSource2 for ddSub1 each time ddMain1 selectedindexchange and postback SqlDataSource2 with controlparameter, set to ddMain1 will bind data to ddSub1 My question is: what should I do if my script change the selectedvalue of both(ddMain1,ddSub1) which its return error because of the autopostback of ddmain1 not execute the ddmain1 selectedindexchange ..at the end i get invalid value for ddSub1 selectedvalue error
|
No responses found. Be the first to respond and make money from revenue sharing program.
|