Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to access values of constituent controls in a User Control

Reply
Thread Tools

How to access values of constituent controls in a User Control

 
 
dwok
Guest
Posts: n/a
 
      07-21-2005
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

 
Reply With Quote
 
 
 
 
Anil Paranganat
Guest
Posts: n/a
 
      07-21-2005
Create a public Text property... and use this property to get and set the
textbox text.

Anil Paranganat


"dwok" <> wrote in message
news: oups.com...
> 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
>



 
Reply With Quote
 
 
 
 
dwok
Guest
Posts: n/a
 
      07-22-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing "Style" along to constituent controls Alex Maghen ASP .Net Web Controls 9 06-01-2006 05:47 AM
How to access values of constituent controls in a User Control dwok ASP .Net Web Controls 2 07-22-2005 12:54 PM
How to access values of constituent controls in a User Control dwok ASP .Net Building Controls 2 07-22-2005 12:54 PM
using javascript in User controls to access server controls of the user control Faizan Ahmed ASP .Net Building Controls 1 01-04-2005 04:09 PM
Constituent Controls and Design Time Jim-M ASP .Net Building Controls 1 06-26-2004 11:13 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57