|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Passing textbox value to commandbe simple for the veterans of VB.net: I have a form with TextBox1 and a button, Button1. I need to pass the value of the textbox (in this case a URL) into the string which controls the opening of Internet Explorer and going to the typed site. I can get as far as opening Internet Explorer and opening a hard-coded site: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click But I want to alter the above to pick up the textbox value of the URL with something like: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Process.Start("iexplore.exe", Me.TextBox1.Value) End Sub I'm sure I need to Dim the TextBox1 in some way and probably add more code. Any ideas would help... Thanks! Just change Me.TextBox1.Value to Me.TextBox1.Text.
-- Show quoteHide quoteTerry "Parasyke" wrote: > Please forgive this newbie, but can someone help with what is sure to > be simple for the veterans of VB.net: > > I have a form with TextBox1 and a button, Button1. > > I need to pass the value of the textbox (in this case a URL) into the > string which controls the opening of Internet Explorer and going to the > typed site. > > I can get as far as opening Internet Explorer and opening a hard-coded > site: > > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles Button1.Click > Process.Start("iexplore.exe", "http://www.microsoft.com") > End Sub > > But I want to alter the above to pick up the textbox value of the URL > with something like: > > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles Button1.Click > Process.Start("iexplore.exe", Me.TextBox1.Value) > End Sub > > I'm sure I need to Dim the TextBox1 in some way and probably add more > code. > > Any ideas would help... Thanks! > >
Controling Event Sequencing...
dataset and where clause Dataset HasChanges function not true when Dataset is passed as variable button flash with red and white color default in .NET byref or byval? DataGridView row background color Define a compilation switch Listbox help How to detect datagrid row change Default value not being populated in dataset |
|||||||||||||||||||||||