Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Going to next page
Message
 
 
To
09/10/2009 18:10:27
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01427461
Message ID:
01428597
Views:
39
>I can see SqlDataSource1_Selecting executing when the form starts. However, when I put something in the textbox, this method doesn't get called. I tried putting
>SqlDataSource1_Selecting(sender, e )
in the textbox_TextChanged method, but this results in an error about being unable to cast into System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs.
>
>Assuming that I should be calling the Selecting event from the textbox, what arguements should I be providing? If the assumption is incorrect, how do I call the Selecting event when I exit the textbox?

No, you're not calling Selecting event from the textbox. It is called automatically every time the page is Loaded. If you want to re-load the information when you changed your text, you may try calling

SQLDataSource.Select() from the Textbox_TextChanged method.

You also would need to re-bind the gridview, I think.

E.g. after SQLDataSource.Select()

GridView.DataBind() (if I recall the methods correctly)
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform