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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:28:58+00:00 2026-05-28T19:28:58+00:00

I have ASP.NET site. At one point postback is triggered and some data is

  • 0

I have ASP.NET site. At one point postback is triggered and some data is modified on server and response is sent (with new view state).
Problem is that I use jQuery to show only a portion of that response on page. That works, but I’m having problems updating view state with new value.
I have somethig like this:

var updatePreviewArea = function (nid) {
    var $content = jQuery('<div></div>');
    $content.load('http://site.com?nid=' + nid, function (response) {
        var $response = jQuery(response);

        jQuery('targetDiv1').replaceWith($response.find('#srcDiv1'));
        jQuery('targetDiv2').replaceWith($response.find('#srcDiv2'));

        // update viewstate from postback response
        var selectors = ['#__VIEWSTATE', '#__EVENTVALIDATION'];
        for (var i in selectors) {
            var value = $response.find(selectors[i]).val();
            jQuery(selectors[i]).val(value);
        }
    });
}

But after this I get:

Sys.WebForms.PageRequestManagerServerErrorException:
Sys.WebForms.PageRequestManagerServerErrorException: Validation of
viewstate MAC failed. If this application is hosted by a Web Farm or
cluster, ensure that configuration specifies the same
validationKey and validation algorithm. AutoGenerate cannot be used in
a cluster.’ when calling method: [nsIDOMEventListener::handleEvent]

  • 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-28T19:28:59+00:00Added an answer on May 28, 2026 at 7:28 pm

    You are taking the viewstate that was returned from the server and updating your content page with it. ViewState is basically an encoded set of name/value pairs that needs to match up with the content on the page that it’s related to. If you take the ViewState of one page and stick it on another, the encrypted value won’t match up and you’ll get an error that’s similar to what you’re seeing.

    Since you’re using jQuery and AJAX to dynamically get content from your server, I’m not sure why you’re depending on ViewState (but I’m not familiar with your application).

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

Sidebar

Related Questions

I have an ASP.NET dynamic data site and for one of the text fields
I have an ASP.NET Site that has a single Master Page. On one of
I have a multilingual ASP.NET site; one of the languages is Arabic (ar-SA). To
In one of the ASP .Net site we are currently working we have a
I am building a site in asp.net and have multiple subdomains. For example, one.cookies.com
I have two ASP.NET 4.0 test sites on a Windows 2008 server (IIS7) One
I have an ASP.NET site that has been running perfectly for a long time,
I have an ASP.NET site that I'm developing. The layout is pretty basic. The
I have an ASP.Net site, in which I am using a ListView with a
I have an ASP.NET site with membership tables in a Main_DB for the site.

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.