Essentially on form load I want a basic VB input box to prompt the user for input in the form of a string (a servername, like MYSERVER01). As of now I am accomplishing like:
//Get server name from user
string serverName = Microsoft.VisualBasic.Interaction.InputBox("Enter the name of the server hosting the share (without '\\\\')", "File copy from Server", "", -1, -1);
string remotePath = @"\\" + serverName + @"\" + "Share";
However, I need remotePath
to be available throughout the the entire project, my question is, where I define it, bearing in mind I only want the messagebox to prompt the user once for the servername.