0

I'm developing a login page for my web-based(asp.net)visual basics application, I want the user name entered on the login page be visible on a label on the redirected form. I page redirect depeding on various occations, for example if the entered user name is for a system administrator I want a redirect to the admin page. and to do so if the user is a Picker, Stock Controller, and loader etc

So now, my problem is when I put an IF statement to my codes, but without an if statement i can redirect to only one page, so if I put an if statement the codes are not processed by the system.

I need someone who can assist with correcting the codes so that they do as I need, thanks in advance

`

 Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        If TextBox3.Text = "Administrator" Then
            Response.Redirect("AddUser.aspx?val=" + TextBox1.Text)
        ElseIf TextBox3.Text = "Receiver" Then
            Response.Redirect("Offload.aspx?val=" + TextBox1.Text)
        ElseIf TextBox3.Text = "Stock Controller" Then
            Response.Redirect("Stock Rotation.aspx?val=" + TextBox1.Text)
        ElseIf TextBox3.Text = "Picker" Then
            Response.Redirect("Pick Order.aspx?val=" + TextBox1.Text)
        ElseIf TextBox3.Text = "Loader" Then
            Response.Redirect("load.aspx?val=" + TextBox1.Text)
        End If
    End SubInline Code Example Here

`

1
Contributor
0
Replies
23
Views
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.