AutoPostback for the Textbox in the userControl
Good Day All
I have a textbox in a userControl and it has a Property "Autopostback" set to true, and as i know , this is encapsulated from the hosting page. now i need to set this property to true so that the Gridview in the Hosting page can recognize that the textbox of the usercontrol is set to true. I have added the following Properties from my User Control
Code:
public bool TextBoxAutoPostBack
{
get {
return txtbxActvs.AutoPostBack;
}
set
{
txtbxActvs.AutoPostBack = value;
}
}
Now i need to use them in my hosting page.
Thanks
Re: AutoPostback for the Textbox in the userControl
Hey,
So what is stopping you accessing the property of your user control?
Do you have a reference to the control? If so, you should be able to simply go .TextBoxAutoPostBack and set the value to what you want.
Gary
Re: AutoPostback for the Textbox in the userControl
How do i use Autopostback Property that i got from a textbox in the usercontrol in the host page.
That is a Question :)
Re: AutoPostback for the Textbox in the userControl
Hey,
If I have understood you correctly, you have a user control, let's say called MyUserControl, and you have an instance of it called myUserControl1. In addition you have a property on that user control called TextBoxAutoPostBack.
So, from your hosting page, i.e. the page that contains the user control, you should be able to do the following:
Code:
myUserControl1. TextBoxAutoPostBack = true;
Is that not what you are asking?
Gary