I have following code, how do I pass parameters from text box to the form parameters in sqldatasource?
<form id="Form1" action="Report.aspx" method=post target=_blank>
<asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox> <br />
<asp:TextBox ID="TextBox2" runat="server" ></asp:TextBox> <br />
<asp:HyperLink ID="Submit1" NavigateUrl="Report.aspx" runat="server" Text="Submit" ></asp:HyperLink> <br />
</form>
What do I need to change in code above to link it to code below? what are the features that allow passing session variables in the text box? If textbox is not able to pass session variables, then what does?
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings %>"
SelectCommand="ReportST" SelectCommandType="StoredProcedure"
>
<SelectParameters>
<asp:FormParameter DefaultValue="1/1/05" FormField="beginningdate" Name="BeginningDate" Type="DateTime" />
<asp:FormParameter DefaultValue="31/12/05" FormField="endingdate" Name="EndingDate" Type="DateTime" />
</SelectParameters>
<form id="Form1" action="Report.aspx" method=post target=_blank>
<asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox> <br />
<asp:TextBox ID="TextBox2" runat="server" ></asp:TextBox> <br />
<asp:HyperLink ID="Submit1" NavigateUrl="Report.aspx" runat="server" Text="Submit" ></asp:HyperLink> <br />
</form>
What do I need to change in code above to link it to code below? what are the features that allow passing session variables in the text box? If textbox is not able to pass session variables, then what does?
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings %>"
SelectCommand="ReportST" SelectCommandType="StoredProcedure"
>
<SelectParameters>
<asp:FormParameter DefaultValue="1/1/05" FormField="beginningdate" Name="BeginningDate" Type="DateTime" />
<asp:FormParameter DefaultValue="31/12/05" FormField="endingdate" Name="EndingDate" Type="DateTime" />
</SelectParameters>