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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:08:13+00:00 2026-05-25T11:08:13+00:00

I have a dashboard which starts in a blank/default state. I am giving the

  • 0

I have a dashboard which starts in a blank/default state. I am giving the user the ability to load a saved state into the dashboard. When they click the ‘Apply’ button I run the following code:

function CloseAndSave() {
    var radUpload = $find(radUpload1ID);
    var inputs = radUpload.getFileInputs();

    if (inputs[0].value.length == 0) {
        alert('Please select a dashboard to upload.');
        return;
    }

    if( !radUpload.isExtensionValid(inputs[0].value) ) {
        alert('Please select an XML file.');
        radUpload.clearFileInputAt(0);
        return;
    }

    oWindow = null;
    __doPostBack(radButton1ID);
}

protected void RadButton1_Click(object sender, EventArgs e)
{
    if (RadUpload1.UploadedFiles.Count > 0)
    {
        UploadedFile dashboardXMLFile = RadUpload1.UploadedFiles[0];

        SerializableDictionary<string, string> dataToLoad = new SerializableDictionary<string, string>();
        XmlSerializer xmlSerializer = new XmlSerializer(dataToLoad.GetType());

        using (StreamReader reader = new StreamReader(dashboardXMLFile.InputStream))
        {
            dataToLoad = (SerializableDictionary<string, string>)xmlSerializer.Deserialize(reader);
        }

        foreach (var entry in dataToLoad)
        {
            string sessionKey = entry.Key;

            if (!string.IsNullOrEmpty(entry.Value))
            {
                Type type = StateManager.GetTypeFromStateName(sessionKey);

                byte[] data = Convert.FromBase64String(entry.Value);
                using (MemoryStream memoryStream = new MemoryStream(data))
                {
                    xmlSerializer = new XmlSerializer(type);
                    SessionRepository.Instance.SetSession(sessionKey, xmlSerializer.Deserialize(memoryStream));
                }
            }
        }
    }
}

RadButton1 has the property “AutoPostBack” set to false. I have set AutoPostBack to false because I wanted to perform validation before running the click event. So, now, I perform client-side validation and then allow the button click to run.

There’s no update panel wrapping RadButton1. As such, the whole page posts after RadButton1_Click. This causes the state of the page to ‘load up’ the parsed state.

At this point, if I refresh the page, Google Chrome says “Please confirm form resubmission.” I’ve read about how to squelch this, but I’d rather track down root cause.

Solution:

//This changes the response to a GET instead of a POST. Prevents the 'Form Resubmission' dialog.
Page.Response.Redirect(Page.Request.Url.ToString(), true);
  • 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-25T11:08:14+00:00Added an answer on May 25, 2026 at 11:08 am

    When you refresh the browser, it will resend the last request you did. If it was a POST request (like you do in case of postback) then it will re-post the information but before doing it you’ll see the warning message you describe.

    The best way to avoid this problem is implementing the pattern Post/Redirect/Get

    Post/Redirect/Get (PRG) is a common design pattern for web developers to help avoid certain duplicate form submissions and allow user agents to behave more intuitively with bookmarks and the refresh button.

    Normally people don’t implement this (although we should) unless the re-post may cause some data inconsistency.

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

Sidebar

Related Questions

I understand that Primefaces Layout and Dashboard have state which can be saved. Could
I have a dashboard with users details which they can edit. I would like
I have a dashboard which contains around 16 graphs. All the settings of the
I have a dashboard in my website which contain some entries in table, each
I'm developing a dashboard using ASP.NET MVC3 and need to have two divs which
I have a web application that functions as a dashboard, allowing a user to
I have a web project in asp.net in which i have dashboard on which
I have a basic dashboard which consists of a single grid object displaying 3
I have a dashboard page in which I am using various MSCharts. I have
I have developed a web dashboard which has a structure of controls embedded inside

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.