Access html control in Web form

G

Guest

Hi,
I have defined some html elements like html password field in the html tag section.
Now i want to access it into the Web form Code

Thank in advanc

Das
 
G

Guest

Hi
I want to access the control within the same web form. I think this doesn't wor

Thanks in advance
Das
 
A

avnrao

you can access html controls only on post back of that Form. and as i know
this is the only way you can access them.
you cant access like normal server control.

Av.
 
A

avnrao

I hope you dont want to set this in code behind?
use <input type="password"/> for password text and if its server control use
TextMode = Password in properties window.

Av.
 
E

Eliyahu Goldin

You have to set runat=server. This will turn your element into a server
control. Also you need to give your element an id. Then you can find the
element with method FindControl (your id). The method should be called on
the element's parent.

Eliyahu
 

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,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top