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

  • Home
  • SEARCH
  • 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 3397060
In Process

The Archive Base Latest Questions

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

Good afternoon all Here is my scenario: I have user controls within a master

  • 0

Good afternoon all

Here is my scenario:

I have user controls within a master page and within a user control, I may have an update panel. I have the following bit of code I place within a usercontrol that maintains various control styling during partial postback i.e. those controls affected within by an asp update panel.

function pageLoad(sender, args) {
        if (args.get_isPartialLoad()) {
            $("select, span, input").uniform();

Indeed, when an update panel does its thing, the Fancy Dan styling is maintained.

However, I have one gripe – when a ‘large’ partial postback occurs, occassionally you’ll see the default, generic control styling reappear breifly and then the uniform kicks in to reapply the new fancy styles.

Is there any way I can avoid seeing the nasty old, default, bland stylings?

Any suggestions greatly appreciated.

  • 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-18T04:28:59+00:00Added an answer on May 18, 2026 at 4:28 am

    Check out working with PageManagerRequests: MSDN Working With PageRequestManager

    1. Sys.WebForms.PageLoadingEventArgs Class
    2. Sys.WebForms.PageRequestManager pageLoading Event

      $(function() {
          Sys.WebForms.PageRequestManager.getInstance().add_pageLoading(beautify);
      });
      
      
      function beautify(sender, eventArgs) {
          // If we have event args
          if (eventArgs != null) {
              // for each panel that is being updated, update the html by adding color red
              // to select, span, input elements
              // must remember to call .html() to put html back into the panelsUpdating[i], otherwise it puts in the jQuery Object
              for (var i = 0; i < eventArgs.get_panelsUpdating().length; i++) {
                  //My test code
                  //var content = eventArgs._panelsUpdating[i].outerHTML;
                  //var jContent = $(content);
                  //$("input", jContent).css("color", "red");
                  //jContent = $('<div>').append(jContent)
                  //var jContentToContent = jContent.html();
                  //alert(jContentToContent);
                  //eventArgs._panelsUpdating[i].outerHTML = jContentToContent;
      
      
      
              //Cleaned up
              var jContent = $(eventArgs._panelsUpdating[i].outerHTML);
              $("select, span, input", jContent).uniform();
              jContent = $('&lt;div&gt;').append(jContent);
              eventArgs._panelsUpdating[i].outerHTML = jContent.html();
          }
      }
      

      }

    Edit: I think you understood that the issue was the elements were being placed into the DOM (and therefore painted) before your javascript had a chance to make them uniform(). This intercepts the UpdatePanel and uniform()’s the code prior to it inserted into the DOM

    Edit 2 Alright, I’ve updated it a bunch, I tested this with my test code there and then included the code you’re likely to add. Also, I took a short cut in eventArgs._panelsUpdating – i should really be using the get and set functions, but this works.

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

Sidebar

Related Questions

Good afternoon, with all the buzz around the iPhone / AppStore etc, I felt
Good afternoon, I have a web query in Excel 2002 going against a web
Good afternoon, This should be an easy one. I've done the cookie-cutter default ASP.NET
Good morning, afternoon, evening or night (depending on your timezone). This is just a
Good morning. I have an XML file which contains lists of warning and errors
Good morning, I am about to start writing an Excel add-in for Excel 2002.
Good morgning, I would like to be able to analyze text where I am
Good evening I've got a little problem with my DataGridView in a .NET Windows
Good day, We just converted our web application .NET 1.1 to .NET 2.0. We
Good morning, I am the developer of a medium sized PDA application that will

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.