Help! accessing a textbox value from within a custom server control

Q

quinton

I have a webform with a custom server control applied to it. on the
webform I have a single server side textbox which I wish to access
from within the server side control after submiting the form back to
the same webform. Please how do i do this? I am new to C#.NET and
would be very greatful for some/any help.

Many thanks in advance,
Quinton.
 
G

Guest

Within your custom server control use

TextBox tb = Parent.FindControl(yourTextboxID)
if(tb != null) Response.Write(tb.Text)

Suresh

----- quinton wrote: ----

I have a webform with a custom server control applied to it. on th
webform I have a single server side textbox which I wish to acces
from within the server side control after submiting the form back t
the same webform. Please how do i do this? I am new to C#.NET an
would be very greatful for some/any help

Many thanks in advance
Quinton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top