Accessing HTML text box values server side aspx

R

Ryan

Hello,

If I have an HTML text box that I want to manipulate with javascript,
how can I access the value of the text box on postback server-side?

Thanks,
Ryan
 
G

Guest

Hey Ryan,
Make it runat=server. You can then reference it in the codeBehind like:
this.Text1.value
 
R

Rob Meade

...

If I have an HTML text box that I want to manipulate with javascript,
how can I access the value of the text box on postback server-side?

Hi Ryan,

You can use...

Dim myString as string

myString = Request.Form("txtBoxName")

HTH

Rob
 
R

Ryan

Will a runat=server control render if it is not visible? That is the
problem I have using the web control. The Request.Form works but then
I had to response.write my javascript...
 

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

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,044
Latest member
RonaldNen

Latest Threads

Top