Problem with redirecting

A

Ankur Jain

Hi,
I am facing a very weird problem while redirecting to another page.
The problem is as follows:
I have a website. I build the solution and run the application.
The first page is the login page. I enter a valid login and password
and click the "login" button. The click event call the database and
validates the information. After verification the Response.Redirect is
fired. The problem comes here. The redirected page does not come up.
The problem becomes weired because the same piece of code works fine
when i run the application in the Debug mode.
Please provide help. I am struck very badly at this.
TIA
 
P

Prodip Saha

Ankur,
With ASP.Net, you can use Server.Transfer("your aspx page name"). The
Server.Transfer will abort the current thread (leaving the lines of code
unexecuted below the Server.Transfer). Response.Redirect works little
differently. You must use the redirect method before the header information
gets written.

Prodip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top