Java input box and

Should be easy or so I've been told..  : )

What I'm looking for is...

I have an  button on a page, I want a popup input box to show when the button is pressed
and the ablity to read the users inout into my code... ie: (vb example)
Dim mystring as string = inputbox("enter some text")

now I want to be able to work with "mystring" in the code.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

add this to your page_load

assuming you have a aspbutton which will postback the form and is named button1
button1.AddAttribute("onclick","hdnctrl.value=prompt('enter some text','default value');")

assuming you have a hidden control called hdnctrl

now the button click event should be able to access hdnctrl's value as the user entered input

easy right?

Have Fun
flosoftAuthor Commented:
where do I put that code?... the asp button also has an onclick event in the .vb file...

hopefully ez...
button1.AddAttribute("onclick","hdnctrl.value=prompt('enter some text','default value');")

will go in your page_load

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Either what pratap_r said, or you could have a hidden layer on your html with the code, then display when the button is clicked..
flosoftAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.