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

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Misha

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Shaun Vermaak

txtHeight1.Text in code behind
ASKER
Murray Brown

Thanks Misha. Out of interest how would I set the value too
Misha

Try this code:
txtHeight1.Text = "YourText"

Open in new window

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER
Murray Brown

I get txtHeigt1 is not declared
Misha

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"
ASKER
Murray Brown

The rebuild unfortunately didn't work
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
Murray Brown

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

Don't know how I missed that :D
ASKER
Murray Brown

No problem Shaun. Your posts steered me in the right direction
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes