Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 03, 2008 10:22 AM by siva_sm
Jan 03, 2008 05:25 AM|LINK
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
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: