I'm new to vb.net and have been asked to add a page that leads to other pages in an application. Basically a landing page that goes to one of three other pages dependent on what user intends.

Here is aspx code (not all of course but what's needed for redirect or transfer to page)

<asp:Button ID="btnGoMain" runat="server" Text="Create New" 
        Font-Names="Trebuchet MS" Font-Size="8pt" Width="80px" />
        <asp:Button ID="btnSave" runat="server" Text="Remove" 
        Font-Names="Trebuchet MS" Font-Size="8pt" Width="80px"  >
        <asp:Button ID="btnEdit" runat="server" Text=" Edit " 
        Font-Names="Trebuchet MS" Font-Size="8pt" Width="80px" />

here is .vb code behind that I've put together so far, not sure what else is needed. Getting error here..
Compiler Error Message: BC30001: Statement is not valid in a namespace.
Protected Sub btnNew_Click(ByVal.......

Partial Class StartServerReg
    Inherits System.Web.UI.Page
End Class

Protected Sub btnNew_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnNew.Click
    Response.Redirect("NewRec.aspx")
End Sub
Protected Sub btnRem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRem.Click
    Response.Redirect("EditRec.aspx")
End Sub
Protected Sub btnEdit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEdit.Click
    Response.Redirect("RemoveRec.aspx")
End Sub

I changed a few thinks in aspx.vb (code behind) page...and now it works.

Partial Class StartNewEditRem
    Inherits System.Web.UI.Page
    Protected Sub btnNew_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnNew.Click
        Response.Redirect("NewRec.aspx")
    End Sub
    Protected Sub btnRem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRem.Click
        Response.Redirect("NewRec.aspx")
    End Sub
    Protected Sub btnEdit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEdit.Click
        Response.Redirect("ShowGrid.aspx")
    End Sub
End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.