Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7631739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:25:53+00:00 2026-05-31T06:25:53+00:00

I have code within a try/catch block with a redirect to another page. If

  • 0

I have code within a try/catch block with a redirect to another page. If any error happens, the catch also redirects to another page. When a user clicks on a submit button the page does not redirect anywhere. It does some sort of page refresh and stays on the same page. It happens sometimes. Other times, the button needs to be clicked a few times before the redirect is recognized and then it redirects to the SUCCESS Page. Any thoughts on why this is happening? Thanks.

try
{
    ...
    Response.Redirect("SOME PAGE SUCCESS", false);
}
catch (Exception ex)
{
    Response.Redirect("SOME PAGE FAIL");
}

A js script does a doPostBack to submit data to the server side.

setTimeout('__doPostBack(\'' + el.name + '\',\'' + args + lia + '\')', 500);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:25:55+00:00Added an answer on May 31, 2026 at 6:25 am

    I had to redo the whole page. Apparently, there were too many setTimeout(‘__doPostBack()’,500); calls within the javascript which refreshes the page randomly and does not allow the server to finish running through its code. Got rid of all of the __doPostBack calls into the server and used the asp.net controls and worked with the server directly for page submissions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using c# code within a web application, I have a try catch statement in
I have some IO code that reads a stream within a try..catch. It catches
I have the following code. Within the same block of code, I disable a
I have a block of code that runs within a TransactionScope and within this
I have a piece of code that has a loop within a try statement.
I have the following code within a stored procedure. WHERE WPP.ACCEPTED = 1 AND
I have the following code, but i got a problem. Within my While, a
I have ADO.Net code as below, that calls a stored procedure. Within the stored
I have a controller within MVC3 which needs to return a response code 500
Within one Activity I have th following piece of code: public void onStartMonitoringToggleClicked(View v)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.