Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

ASP.net gather value in input box

Hi

In my ASP.net I have the following input box
<input type="text" name="txtHeight1" placeholder="From" id="txtHeight1" class="auto-style5"/>

Open in new window


How do I use the value that is input using VB.net?
ASP.NETVisual Basic.NET

Avatar of undefined
Last Comment
Murray Brown
ASKER CERTIFIED SOLUTION
Avatar of Misha
Misha
Flag of Russian Federation image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

txtHeight1.Text in code behind
Avatar of Murray Brown
Murray Brown
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Thanks Misha. Out of interest how would I set the value too
Avatar of Misha
Misha
Flag of Russian Federation image

Try this code:
txtHeight1.Text = "YourText"

Open in new window

Avatar of Murray Brown
Murray Brown
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

I get txtHeigt1 is not declared
Avatar of Misha
Misha
Flag of Russian Federation image

Rebuild solution? Also try to check your  apsx page and make sure that it contains a txtHeigt1 with that name, and that it is declared as runat="server"
Avatar of Murray Brown
Murray Brown
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

The rebuild unfortunately didn't work
Avatar of Murray Brown
Murray Brown
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Sorry I missed the Runat="Server". I did a rebuild and this worked
 Height1.Value = "x"
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

Don't know how I missed that :D
Avatar of Murray Brown
Murray Brown
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

No problem Shaun. Your posts steered me in the right direction
ASP.NET
ASP.NET

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

128K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo