Click here to Skip to main content
16,019,055 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I don't know how to describe, I am just a New-Bird.I want to such as assigned a string from inputbox to a variable.

This is a very simple thing maybe, Please give me a example.
Posted
Comments
BHAVESH63 12-Mar-13 8:41am    
String str;
str=YourInputBox.text

1 solution

Try something like

C#
string value;
if (My.InputBox("Title", "Text:", ref value) == DialogResult.OK)
{
  string output = value;
}


Here are some links that might help you -
http://www.csharp-examples.net/inputbox/[^]
http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.interaction.inputbox%28v=vs.100%29.aspx[^]
 
Share this answer
 
Comments
VellBibi 12-Mar-13 8:54am    
Thanks,it's really help...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900