0

I am trying to create a simple login form on giving correct username and password the form is not tranferring to the next page it just remains in the same page.And my code is

<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>

Edited by Reverend Jim: wrong forum

3
Contributors
3
Replies
14
Views
4 Years
Discussion Span
Last Post by JorgeM
0

I got the output:
and the code is

<script runat="server">
sub Page_Load
If txtuname.Text="karthi"  AND txtpass.Text="karthi" Then
response.write("Welcome user")
response.redirect("login2.aspx")
Else
response.write("Invalid Username and Password")
End If
End sub
</script>
0

So what's happening with your code? Is the page load block you added not triggering? Are you at least getting a postback? Seeing the rest of your code would be helpful.

I agree with Begginnerdev that this approach is not the best choice.

Edited by JorgeM

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.