How to access values of constituent controls in a User Control

  • Thread starter Thread starter dwok
  • Start date Start date
D

dwok

Hi All,

I am building what I thought was a very simple user control in
ASP.NET. The control is just a standard asp.net calendar control and a
text box control. When the user selects a date within the calendar
control, the text box is updated with the selected date.

My problem is how do I access the text within the text box? It is no
longer a seperate text box control but rather it is part of a User
Control. Any thoughts?

Thank you.

- Drek
 
Create a public Text property... and use this property to get and set the
textbox text.

Anil Paranganat
 
That worked! Thank you for the reply.

I created a ReadOnly Property that returned to me the value of the text
control.

Public ReadOnly Property MyTextBoxValue() as string
return theTextbox.value
End Property
 
Back
Top