Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Basic Q - Response.Redirect, all redirect to first Response.Redirect statement

Thread Tools

Basic Q - Response.Redirect, all redirect to first Response.Redirect statement

Posts: n/a
I have 4 files
1. login.htm - Username and password box (Start page, links to Auth.aspx
2. Auth.aspx - checks user against databas
3. ChangePsswd.aspx - allows user to change pssw
4. Error.htm - If logon is unsuccessful

In the Auth.aspx file, I have the following
Dim validate = (login(in_Username, in_UserPW)) // returns 1 if user in DB. 0 if no

Select Case validat
**Display data*
messBox("User does not exist"
End Selec

Elsewhere on the page I have another function redirecting the user to ChangePsswd.aspx to change there password

Private Sub btnChngPwd_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnChngPwd.ServerClic
End Su

However, any time I select the button change password, it always redirects me to the page Error.htm. I have other redirects on the page, but all redirect to the first listed redirect command Response.Redirect("Error.htm") in the select statement. i have tried using both Response.Clear() and Response.End() for all Redirect staements (before and after) but to no avail. Any Ideas much appreciated


Reply With Quote
Posts: n/a
Ok, something I have just tried and seems to be working, is encapsulating all code in the Function
Private Sub Page_Load(.....


If Not Page.IsPostBack The
End i

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
if statement that, when false, skips first statement in its block, executes second? Jay McGavren Java 11 01-16-2006 05:49 PM
How do I do a conditional statement in a constant statement? VHDL 3 12-16-2005 06:13 PM
First statement always evaluated first? tconkling C Programming 3 07-09-2005 10:05 PM
exec "statement" VS. exec "statement in globals(), locals() Ted Python 1 07-22-2004 08:51 AM
exec "statement" VS. exec "statement" in globals(), locals() tedsuzman Python 2 07-21-2004 08:41 PM