How to access Client Side control in server side button click event?

Hi all,

I need to access client side control from server side code. For an example

<form id="form1" runat="server">

<table>

<tr>

<td>UserName:td>

<td><input type="text" id="textBoxUserName" />td>

<td><asp:Button ID="buttonShow" runat="server" Text="show" OnClick="buttonShow_Click" />td>

tr>

table>

 

form>

I need to access the textBoxUsername in the server side button click event.

How to do that?

Thanks

R. Eswaran.

0
Eswaran_MCA
10/31/2008 6:13:48 PM
📁 asp.net.web-forms
📃 93655 articles.
⭐ 6 followers.

💬 1 Replies
👁️‍🗨️ 1972 Views

 Make sure you provide a name for your input box:

 <input type="text" id="textBoxUserName'"  name="mytext" />

then in your code behind,

 Request("mytext")

 

Please make sure to mark as asnwer if this solution works for you.


NAbeel
--*Please mark as answer if you find this post helpful*--
0
nabeelsage
10/31/2008 10:44:08 PM