I have a gridview connected to sqldatasource and regular textbox.
In sqldatasource I defined selectparameters controlparameter to textbox.
I'm trying to rebind gridview when textbox text is changed.
So question is how can I rebind sqldatasource?
Printable View
I have a gridview connected to sqldatasource and regular textbox.
In sqldatasource I defined selectparameters controlparameter to textbox.
I'm trying to rebind gridview when textbox text is changed.
So question is how can I rebind sqldatasource?
Hey,
Can you show the ASPX markup for the page that you are using?
You would either have to set the TextBox AutoPostBack property to true, so that the page post backs each time the text changes, or you would need to provide a Button which the user could push once they have finished editing the textbox, to then post back the page to the server, thus rebinding the controls on the page.
Gary
Hey,
Glad you got it sorted!
The only thing to bear in mind here is that this means that every time the text changes, a post back to the server occurs. That is a lot of round trips, which may take quite a while. Just something to bear in mind.
Gary