T
tshad
I am trying to change the SQLDataSource parameter programatically but am
getting an error:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$
ConnectionStrings:CSpearAndAssociatesConnectionString %>"
SelectCommand="GetQuestions" SelectCommandType="StoredProcedure">
<SelectParameters>
<asparameter DefaultValue="1" Name="SurveyTestID" Type="Int32"
/>
</SelectParameters>
</asp:SqlDataSource>
I tried:
SqlDataSource1.SelectParameters["SurveyTestID"].DefaultValue =
Request("ST")
But got the error:
Property access must assign to the property or use its value.
What am I missing?
Thanks
Tom
getting an error:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$
ConnectionStrings:CSpearAndAssociatesConnectionString %>"
SelectCommand="GetQuestions" SelectCommandType="StoredProcedure">
<SelectParameters>
<asparameter DefaultValue="1" Name="SurveyTestID" Type="Int32"
/>
</SelectParameters>
</asp:SqlDataSource>
I tried:
SqlDataSource1.SelectParameters["SurveyTestID"].DefaultValue =
Request("ST")
But got the error:
Property access must assign to the property or use its value.
What am I missing?
Thanks
Tom