Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating a simple login form using vb.net on giving the correct username and password the form is not transferring to the next page.How to resolve this?

XML
<script runat="server">
sub Page_Load
If txtuname.Text="xxx"  AND txtpass.Text="xxx" Then
Response.write("Welcome user")
Server.Transfer("login2.aspx")
Else
Response.write("Invalid Username and Password")
End If
End sub

</script>
Posted
Comments
Ankur\m/ 6-Aug-13 6:27am    
Can you put a debugger and debug the code to see what's wrong.

1 solution

You probably want to use Response.Redirect not Server.Transfer

The two have very different behaviours.
 
Share this answer
 
Comments
ammukarthi 6-Aug-13 6:32am    
The page is redirected to the next after i changed the code as you said but the contents of the page is not displayed instead an empty page is displayed without any contents
ammukarthi 6-Aug-13 6:35am    
The code doesn't shows any error it simply redirects to the specified page without any contents
Stephen Hewison 6-Aug-13 6:57am    
Then I'd suggest there's a problem with your other page too.
ammukarthi 6-Aug-13 7:02am    
The second page doesn't have any code it just have a welcome text and a button.
Stephen Hewison 6-Aug-13 7:12am    
And are these visible if you manually type of the address into the browser?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900