I do have something like this"
<asp:SqlDataSource ID="findAutoNumberSqlDataSource" runat="server"
CancelSelectOnNullParameter="False" ConnectionString="<%$ ConnectionStrings:MainWebConnection %>"
SelectCommand="SELECT AutoNumber FROM MainClassifieds WHERE (TEnterDate = (SELECT MAX(TEnterDate) AS Expr1 FROM MainClassifieds AS MainClassifieds_1 WHERE (TUserName = @gettingUserName,TItemName = @ItemTitle AND TListingComment = @ListingComment )))">
<SelectParameters>
<asp:ControlParameter Name="gettingUserName" ControlID="gettingUserName" PropertyName="Text" />
<asp:ControlParameter Name="ItemTitle" ControlID="ItemTitleTextBox" PropertyName="Text"/>
<asp:ControlParameter Name="ListingComment " ControlID="CommentTextBox" PropertyName="Text"/>
</SelectParameters>
</asp:SqlDataSource>
This parameter: <asp:ControlParameter Name="gettingUserName" ControlID="gettingUserName" PropertyName="Text" /> is working fine, because is not include inside a form like the others two.
The others two parameters are link to a textbox, and these textboxes are inside a form called: FormViewDataEntry. So, the control parameter can not get the value from inside the form. Is there any way that I get a value to these two parameter from the corresponding textbox that are locate inside the form? How can I get the values from inside the form? Is it possible without using code behind?
Thanks