Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello,

i design a html text box in .cs page how i will get the value of the text box which i entered
Posted

Are you new to asp.Net. go with this[^] link.

.cs page is called codebehind. here we coollect value of textbox in .cs page

C#
Page.Title = Textbox1.value;

in above we have entered value from textbox and assign it to Page title.
 
Share this answer
 
string strValue=TextBox1.Text
from this way u will store the enter value anywhere
 
Share this answer
 
string txtvalue=Textbox1.Value;



write code here, the above string will get the textbox value..
 
Share this answer
 
v2
check it in google chrome and right click the textbox and select Inspect Element..
 
Share this answer
 
you can just find the textbox through javascript and store the value of it into a hiddenfield and use this.
 
Share this answer
 

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