| Author: Vikas Joshi 12 Jul 2006 | Member Level: Bronze | Rating:  Points: 2 |
Dear Mr. UmaShankar,
To make use of any HTML control into code behind you have to make the following two changes into the Control...
1. Add the runat=server attribute to the control and place the control inside the form tag 2. Add a ID to that control
Now by these two steps you can access the controls the same way you are using the builtin Web Server controls.
Thanks
Vikas Joshi
|
| Author: dotnet 13 Jul 2006 | Member Level: Gold | Rating:  Points: 2 |
hey use request.form('id of control') to get the value of textbox
|
| Author: dotnet 13 Jul 2006 | Member Level: Gold | Rating:  Points: 2 |
first of all set runat="server" to control put some id after that use request.form("id_of_control").tostring()
|
| Author: Vikas Joshi 13 Jul 2006 | Member Level: Bronze | Rating:  Points: 2 |
Hi, If you require that the control should be a HTML Control then for that you have to do some workaround for that ..
Please follow the following steps :
Add the onClick attribute to the Button Server control.. And then on Click of this Button at Client side Assign these HTML Controls Value into any other filed lets say a Hidden Variable in a Commo or : Seperated way and get this value in the code behind of the page ..through this you can acheive what you want .. means no need to change the Page only add the Client side Click and do the desired on n number of items on the Page...
Hope this solves your problem
Thanks
Vikas Joshi
|
| Author: ankur jain 20 Oct 2008 | Member Level: Silver | Rating:  Points: 3 |
Hi UmaShankar, Firstly put runnat="server" to yor html text fields say txtLogin and textPassword. On asp button Click event in .cs file acess these values as string a = txtLogin.Value; string b= textPassword.Value;
|