471,120 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,120 software developers and data experts.

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

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.
Nov 18 '05 #1
1 952
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

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by wukexin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.