Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
Modify SqlDataSource parameters before select
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Guest, post: 489469"] Hi, is it possible to modify the values of a SqlDataSource's select parameters in the code behind before the select command is executed? Example: I have an SqlDataSource with a ControlParameter <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:XYZ %>" SelectCommand="myStoredProcedure" SelectCommandType="storedProcedure"> <SelectParameters> <asp:ControlParameter ControlID="txtTitle" Name="Title" PropertyName="Text" Type="String" DefaultValue="%" /> </SelectParameters> </asp:SqlDataSource> What I'd like to do is to modify the value of the Title parameter before the select command is executed. E.g. if the user enters "abc*" in txtTitle, I'd like to change the parameter's value to "abc%". Thanks for any help, Martin [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
Modify SqlDataSource parameters before select
Top