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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:59:57+00:00 2026-05-29T04:59:57+00:00

I have an aspx page with repeater control on it used for showing the

  • 0

I have an aspx page with repeater control on it used for showing the data.The user can modify the data inside the repeater but the data will not get saved until the SAVE button is hit.
I also have an UNDO button on the page. If the user clicks this button, I want to reload the page and discard the changes made by user (similar to UNDO functionality in MS Office)
I need to show him the same data that was shown when the page was loaded for the first time.

Kindly help me with this.

Thank you !

  • 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-29T05:00:00+00:00Added an answer on May 29, 2026 at 5:00 am

    This line of code is read the url as it is, and redirect you to the same page with out new post. Place it on button click, on code behind.

    Response.Redirect(Request.RawUrl);
    

    P.S. If you just make post, the input controls will keep their data, so you need to reload the page from the beginning, with the redirect. If you not make redirect you need to handle the controls and clear them.

    Additional you can avoid the post back and round trip to the server and do the same on client side with javascript calling the OnClientClick="return ReloadPage();" with javascript code:

    function  ReloadPage()
    {
        top.location.replace( updateURLParameter(document.location.href, "_rnd", Math.random()) );
        return false;
    }
    //
    // this function is an improved version of
    // http://stackoverflow.com/a/10997390/159270
    //
    function updateURLParameter(url, param, paramVal)
    {
        var TheAncor = null;
        var newAdditionalURL = "";
        var tempArray = url.split("?");
        var baseURL = tempArray[0];
        var additionalURL = tempArray[1];
        var temp = "";
    
        if (additionalURL) 
        {
            var tmpAncor = additionalURL.split("#");
            var TheParams = tmpAncor[0];
                TheAncor = tmpAncor[1];
            if(TheAncor)
                additionalURL = TheParams;
    
            tempArray = additionalURL.split("&");
    
            for (i=0; i<tempArray.length; i++)
            {
                if(tempArray[i].split('=')[0] != param)
                {
                    newAdditionalURL += temp + tempArray[i];
                    temp = "&";
                }
            }        
        }
        else
        {
            var tmpAncor = baseURL.split("#");
            var TheParams = tmpAncor[0];
                TheAncor  = tmpAncor[1];
    
            if(TheParams)
                baseURL = TheParams;
        }
    
        if(TheAncor)
            paramVal += "#" + TheAncor;
    
        var rows_txt = temp + "" + param + "=" + paramVal;
        return baseURL + "?" + newAdditionalURL + rows_txt;
    }
    

    The above code is adding a random number to the end of the url, or update it if exist to avoid to keep the page on cache. If you all ready avoid to keep the page on cache you can do the same with out the extra random parameter.

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

Sidebar

Related Questions

I have a Linkbutton inside a Repeater control. My code in the aspx page
I have an aspx page which contains a repeater. I can output data using
I have a Repeater control in my aspx page: <asp:Repeater ID=repeater runat=server EnableViewState=false> <ItemTemplate>
I have a asp.net repeater control in a aspx page, with runat=server and an
I have a nested repeater set up but the child repeater control is not
I have a repeator control in my aspx page. I am binding data to
I have a page (default.aspx) with a Repeater fetching data from my database, this
I have a user control that contains a repeater. It seems that data cannot
I have a repeater control on my .aspx page. There are times where a
General Info: Aspx page holds an Ascx User control. Inside the User control, the

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.