Variable in URL

J

jonhrs

Hi,

I am VERY new to programming and VB.NET.

I have a windows form which has radio buttons and passes a variable
into the URL which is the server name, this is attained from a text
box.

It opens up IE no problem, but it doesn't pass the servername variable
into the URL properly. Can anyone assist please?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

If RadioButton1.Checked = True Then
System.Diagnostics.Process.Start("IExplore.exe", "http://"
& SrvName & ":3513/adaptec")
End If

Thanks.
 
K

Ken Tucker [MVP]

Hi,

I do not see where you declared or assigned a value to SrvName.

Ken
------------------
Hi,

I am VERY new to programming and VB.NET.

I have a windows form which has radio buttons and passes a variable
into the URL which is the server name, this is attained from a text
box.

It opens up IE no problem, but it doesn't pass the servername variable
into the URL properly. Can anyone assist please?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

If RadioButton1.Checked = True Then
System.Diagnostics.Process.Start("IExplore.exe", "http://"
& SrvName & ":3513/adaptec")
End If

Thanks.
 
H

Herfried K. Wagner [MVP]

It opens up IE no problem, but it doesn't pass the servername variable
into the URL properly. Can anyone assist please?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

If RadioButton1.Checked = True Then
System.Diagnostics.Process.Start("IExplore.exe", "http://"
& SrvName & ":3513/adaptec")

Where did you declare/define the 'SrvName' variable? I suggest to turn
'Option Explicit On' in order to prevent the use of undeclared variables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top