Input Box, similar to MessageBox, displays a prompt and accepts a string from the user.


/ Published in: C#
Save to your folder(s)

The URL has code for an InputBoxDialog class that implements a simple input dialog.

The button flatstyle property might need to be changed to match the default.


Copy this code and paste it in your HTML
  1. // Example usage. See URL for implementation.
  2.  
  3. InputBoxDialog ib = new InputBoxDialog();
  4.  
  5. ib.FormPrompt = prompt;
  6. ib.FormCaption = title;
  7. ib.DefaultValue = defaultValue;
  8.  
  9. ib.ShowDialog();
  10.  
  11. string s = ib.InputResponse;
  12.  
  13. ib.Close();

URL: http://www.knowdotnet.com/articles/inputbox.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.