I am trying to change the SQLDataSource parameter programatically but am
getting an error:
<asp:SqlDataSou rce ID="SqlDataSour ce1" runat="server"
ConnectionStrin g="<%$
ConnectionStrin gs:CSpearAndAss ociatesConnecti onString %>"
SelectCommand=" GetQuestions" SelectCommandTy pe="StoredProce dure">
<SelectParamete rs>
<asp:Paramete r DefaultValue="1 " Name="SurveyTes tID" Type="Int32"
/>
</SelectParameter s>
</asp:SqlDataSour ce>
I tried:
SqlDataSource1. SelectParameter s["SurveyTest ID"].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:SqlDataSou rce ID="SqlDataSour ce1" runat="server"
ConnectionStrin g="<%$
ConnectionStrin gs:CSpearAndAss ociatesConnecti onString %>"
SelectCommand=" GetQuestions" SelectCommandTy pe="StoredProce dure">
<SelectParamete rs>
<asp:Paramete r DefaultValue="1 " Name="SurveyTes tID" Type="Int32"
/>
</SelectParameter s>
</asp:SqlDataSour ce>
I tried:
SqlDataSource1. SelectParameter s["SurveyTest ID"].DefaultValue =
Request("ST")
But got the error:
Property access must assign to the property or use its value.
What am I missing?
Thanks
Tom
Comment