i m trying to use composite cotrol in my app. that i never used before..
i have created a custom control useing .ascx file. i have created a table and some lable and textbox control in that
now when i add it into my page, i can see all controls but i m unable to access its values in my page. neither i can enter anything in the textbox.
whats the proper way to achieve this? by using class of that custom control or by doing some setting some propertiy, i can directly access these controls
in my web page?
---- Thanks in advance
Cheers!
KK
Please mark as Answer if post helps in resolving your issue
My Site
In order to be accessbile from the aspx page, the required properties of the text box controls (such as the Text property) in the .ascx should be exposed as
public properties in the code-behind (.ascx.cs/vb). You can wrap the text box properties as user control properties or via a private variable.
kedarrkulkar...
All-Star
34285 Points
5514 Posts
how to with custom or composite cotrol...
Jan 03, 2008 05:25 AM|LINK
Hello,
i m trying to use composite cotrol in my app. that i never used before..
i have created a custom control useing .ascx file. i have created a table and some lable and textbox control in that
now when i add it into my page, i can see all controls but i m unable to access its values in my page. neither i can enter anything in the textbox.
whats the proper way to achieve this? by using class of that custom control or by doing some setting some propertiy, i can directly access these controls
in my web page?
---- Thanks in advance
KK
Please mark as Answer if post helps in resolving your issue
My Site
siva_sm
Star
9409 Points
1375 Posts
Re: how to with custom or composite cotrol...
Jan 03, 2008 10:22 AM|LINK
In order to be accessbile from the aspx page, the required properties of the text box controls (such as the Text property) in the .ascx should be exposed as public properties in the code-behind (.ascx.cs/vb). You can wrap the text box properties as user control properties or via a private variable.
See these for a sample: http://microsoft.apress.com/asptodayarchive/73667/making-a-composite-control-with-aspnet , http://www.15seconds.com/issue/020319.htm
user control Composite Control