Subscribe to Subscribers
Talk to Webmaster Tony John

Online Members

joyhenrry
More...


Forums » .NET » ASP.NET »

How to get a HTML textbox value in our .aspx.cs file?


Posted Date: 10 Dec 2009      Posted By:: Jannat     Member Level: Silver    Member Rank: 0     Points: 1   Responses: 3



I m using asp.net with C#....I created a HTML text box <input type=text id="t1" /> in my source.

Now i want to get that value in a asp label when i click an asp button after entering a value in html textbox....

plz help.........




Responses

#452373    Author: kamna      Member Level: Gold      Member Rank: 155     Date: 10/Dec/2009   Rating: 4 out of 54 out of 54 out of 54 out of 5     Points: 6

put another attribute to it
that runat=server,
you wil get id on code page

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


Thanks & Regards
Kamna Nagpal



 
#452374    Author: :-) Pinna (:-      Member Level: Gold      Member Rank: 390     Date: 10/Dec/2009   Rating: 2 out of 52 out of 5     Points: 2

Hi Jannat,

Request.form(<textboxName>.value)

Don't Forget to Rate this Response
Regards
Harinath Pinna
Enjoy LifE, this is not a Rehearsal



 
#452439    Author: Anil Kumar Pandey      Member Level: Platinum      Member Rank: 1     Date: 11/Dec/2009   Rating: 2 out of 52 out of 5     Points: 2

You need to make that control as Server side using Runat=server. else the HTML control value can only be accessed in client side using java script...

Thanks & Regards
Anil Kumar Pandey
Microsoft MVP, DNS MVM






 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Set the position of the panel using JQUERY
Previous : Listbox items with popup window
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.