Thread: link two pages

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    13
    Rep Power
    0

    Question link two pages


    hello to all! ! !

    I would like to learn how can i link 2 pages

    For ex. I have the pages "A.aspx" and the page "B.aspx" . At "A" I have a button that must link to "B".

    I use ASP.NET with VB.Scrept and I nead to know that statement pls.

    this is what I try to do but is wrong

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    url = "/B.aspx"
    End Sub

    Thx
    Isambella
  2. #2
  3. No Profile Picture
    Overly white
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Fresno, CA
    Posts
    83
    Rep Power
    12
    You could do this.
    Code:
    <%
    Dim strPage
    strPage = server.variable("PATH_INFO")
    
    If strPage = "/A.asp" then
      Response.Write("<a href = '/B.asp'>B</a>")
    else
      Response.Write("<a href = '/A.asp'>A</a>")
    End If
    %>
    Just place that where you want the link to be.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    13
    Rep Power
    0

    thx


    Thx a lot,

    but now I use

    url = "AttIndHome.aspx?UserID=" + txtA_UN.Text
    Response.Redirect(url)

    I believe is a better approach , because You can pass parameters to the next page

    thx again
    Isambella

IMN logo majestic logo threadwatch logo seochat tools logo