 |
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

March 7th, 2006, 12:08 AM
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Page flash from using master page
I've got a complex page built in VS2005, based on a master page, and with a customized gridview, that was producing a pronounced page flash on document.forms[0].submit().
In the process of removing different potential causes, I discovered that that flash goes away when I convert the page so that it does not use a master page.
Is this a known "feature" of using master pages, with complex pages? Or are there other known causes of "page flash"? (On a simpler test page with a simpler grid view, the master page doesn't seem to make much difference.)
I can do without the master page in this case, though it would be helpful to understand if this is a known behavior.
Any suggestions with respect to this would be appreciated.
Thanks!
|

March 7th, 2006, 01:41 AM
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
In review, I saw that I also had the gridview inside a user control on the page. In the test that eliminated the page flash, I had also moved the gridview elements into the single <html>, instead of being pointed to by a <uc
Is that something that is known to cause page flash?
Or is it likely just a complicated page, taking time to refresh during postback?
|

March 7th, 2006, 06:42 PM
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
After more experimentation I concluded it was just page size. The flash time is reduced if I don't use the master page and user controls, but only maybe 50% (all sub-second on the local server, at any rate), and the difference declines as the gridview row count increases.
I decided to keep the master page and user controls for now, during early development, and work on performance later if it's important (maybe with AJAX etc).
|

March 7th, 2006, 06:46 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Depending on the setup of your application, you can disable the ViewState for the grid. That has a huge impact on page size.
If you want to use AJAX in .NET, make sure you check out Microsoft's Atlas: http://atlas.asp.net/
I think there'll be a Go-live license pretty soon, although the product is still a CTP.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|

March 7th, 2006, 08:45 PM
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for the message. Disabling viewstate seemed to speed up the first display, but not so much on subsequent. A lot of the price of the master page and user controls for subpages is that ASP.NET generates these long field names and id's that concantenate the names of the nested elements. There's lots of text built and sent in this form, and it can be reduced in a number of ways.
I've looked longingly at the UpdatePanel, and turned away twice now because of the current EULA. We'll see what "pretty soon" means, and hopefully I can retrofit to use it. Very tempting.
Cheers!
|

March 8th, 2006, 03:18 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Pretty soon should mean within the next 30 days, but don't hold me on that. Scott Guthrie said that on a talk on the Dutch Dev Days yesterday...
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|

March 8th, 2006, 04:56 PM
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for the message. I'm encouraged. I've got "several weeks" of development left before I can go live, so there's a chance I can include UpdatePanel in my solution. I'm hopin'!
|

March 8th, 2006, 05:50 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Just be aware that it's still a beta / CTP so things may change in the final version...
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
 |