Page 1 of 1

www.website + label.text

Posted: Wed Jul 11, 2012 6:14 pm
by patrickcosta
Hi again, I know I am being annoyng but I am new at vb and I need some help.

I have this code in my form:
Code: Select all
    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

        lblSid.Text = WebBrowser2.Document.All("sid").GetAttribute("value")
        TextBox3.Text = WebBrowser1.Url.ToString

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        WebBrowser1.Navigate("http://metrotv.forumaster.net/ucp.php?mode=logout&sid=" + "lblSid.Text")
    End Sub
But when I click in Button2 , the webbrowser1 navigates to
Code: Select all
http://metrotv.forumaster.net/ucp.php?mode=logout&sid=lblSid.Text
, and I want it navigates
Code: Select all
http://metrotv.forumaster.net/ucp.php?mode=logout&sid=LBLSID TEXT HERE
What am I doing wrong ?
Regards

(bad english, i know )

Re: www.website + label.text

Posted: Wed Jul 11, 2012 6:25 pm
by CodenStuff
Remove the quotes around "lblSid.Text" like this:
Code: Select all
WebBrowser1.Navigate("http://metrotv.forumaster.net/ucp.php?mode=logout&sid=" + lblSid.Text)

Re: www.website + label.text

Posted: Wed Jul 11, 2012 6:29 pm
by patrickcosta
CodenStuff wrote:
Remove the quotes around "lblSid.Text" like this:
Code: Select all
WebBrowser1.Navigate("http://metrotv.forumaster.net/ucp.php?mode=logout&sid=" + lblSid.Text)
Thanks a lot, I made very tries, this one escapes me xD

P.S: This is for the phpbb3 logout button in our vb apps.