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 8391655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:19:10+00:00 2026-06-09T19:19:10+00:00

I gotta address a problem here… I’m developing a system where I am constantly

  • 0

I gotta address a problem here…

I’m developing a system where I am constantly showing Messages to the user, For instance…
I’m adding a new client, I input all the data and press Save, ON C# what I do is do all the process of saving, then I use…

ClientScript.RegisterStartupScript(this.GetType(), "Mensaje", "alert('Client Saved Successfully');", true);

And that’s it… Eventually the message is displayed since I’m staying in the same site (because if I want to add another client, I must stay in the sme site, not send me back to my MAIN SCREEN) or at least I’m not telling the system to do a redirection…

However here’s another example…

If I’m going to edit a client, I’m redirected to the edit screen, I input all my changes and click SAVe, on C# I do all the process to save changes, then I use a clientscript as the one above, and then …

this.Response.Redirect("~/Main.aspx");

However, I noticed that if I use a Response.Redirect I will not be in the same page anymore, the alert won’t be displayed to the user….

This is a constant issue that I’m running into, and I would like to know what could be the solution to that…

Thank you and I hope you can help me

  • 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-06-09T19:19:11+00:00Added an answer on June 9, 2026 at 7:19 pm

    This is what I have for my projects:

    public static void jsAlertAndRedirect(System.Web.UI.Page instance, string Message, string url)
    {
        instance.Response.Write(@"<script language='javascript'>alert('" + Message + "');document.location.href='" + url + "'; </script>");
    }
    

    I use it like this from a page:

    HTMLHelper.jsAlertAndRedirect(this, "This is an alert.", ResolveUrl("~/Default.aspx"));
    

    Good luck.

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

Sidebar

Related Questions

here's the trick. gotta convert 'bout 300 files from xls to csv, wrote some
In c#, i gotta verify user inputs. Can someone tell me what will be
gotta a question regarding how to navigate inside the UITableView. Here is the situation:
I gotta a question, but not sure if I understand it right so here
people! I've gotta send messages with attachments. So i've got some code based on
I'm brand new to OOP and I have a question that's gotta be pretty
I've gotta be missing something simple here. Take the following code: public IEnumerable<int> getInt(){
I know this sounded stupid. But I gotta be doing something wrong here. Say,
im completely new to SharePoint and C#, but i gotta do what im told
Gotta be something I'm doing wrong when converting the ttf with OpensIFRr, but I'm

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.