Click here to Skip to main content
15,898,036 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an HTML tag like
<input type="text" id="amount" />
How do i get the value of this label in c#?
Posted
Comments
Bojjaiah 19-Mar-13 6:12am    
use HtmlGenericControl class you can get the value
CHill60 19-Mar-13 6:12am    
Have you tried Page.FindControl("amount");?

You can use below code.

string value = Resquest.Form["textboxname"].ToString();
 
Share this answer
 
try,

<input type="text" id="amount" runat="server" />

hopes this work for you.
 
Share this answer
 
Comments
Ruggers 19-Mar-13 6:30am    
sorry.. can't use runat="server"
[no name] 19-Mar-13 6:58am    
sorry...you will not get value of text in c# withount runat="server"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900