0
votes

I'm using asp.net user control in my web page. I used asp.net repeater control on the user control & created one property of user control.And depending on the value of the propery i loaded the datasource property of repeater control on user control at page load event.

Then i used the userc ontrol on the another asp.net web page & set the property on the page load event. after that it is loading the datasource of repeater control of the user control. Again I have set the user control property on the text changed event of the text box which is placed on the another web page. I want to again load the datasource of repeater control of the user control depending on the value entered in the text box. How to handle this?

1
OnTextChanged event do get the DataSource that you want to use, then Get the data for that data source from the Database & then rebind to repeater. - Deeptechtons
@Deeptechtons: textbox is not on the user control. It is placed on the web page which uses the user control. - Priyanka
so you say it's not possible?? well i am sure it's damn simple. OnTextChangedEvent of page where user control is hosted , get the new posted value of the textbox and then get the datasource to bind with the usercontrol. Set the DataSource property that you mentioned in your question. - Deeptechtons

1 Answers

0
votes

Use OnTextChanged event to bind you repeater, after event fire use __doPostback event and pass some value to it, so that when its postback you can find that value and identify that this post back is done from textchange in IsPostBack event or even you can pass the page event in __doPostBack which will fire automatically then that event for example public void BindRepeaterOnTextChange(){}

check this link for more information
http://wiki.asp.net/page.aspx/1082/dopostback-function/