0

VB has a function InputBox() that will prompt the user to enter a single value, then click OK.

Is there a parallel functionality in ASP.NET, that will get the browser to pop up some kind of input box to return a single value?

If not, how do you recommend I achieve this effect?

3 Answers 3

4

You can do this in JavaScript

var result = prompt("Question", "Default text");
document.getElementById("HiddenInputBox").value = result;
document.HiddenForm.submit();

But most web apps seem to use of screen forms and simulated modal dialogs (fade and disable rest of screen)

jQuery is your friend for this, try simplemodal

Sign up to request clarification or add additional context in comments.

Comments

3

For more functionality, check out the asp.net ajax control toolkit, and specifically the modal popup box control.

http://www.asp.net/ajax/

Comments

2

Yes - use the prompt() javascript function.

var x = prompt("enter a value");

1 Comment

You might want to provide an example of how he would access that value from the code-behind.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.