Showing posts with label panels. Show all posts
Showing posts with label panels. Show all posts

Monday, March 26, 2012

Atlas Update Problem

Hi!, I have a page with a image background, and a image fill table, when viewing it in IE and the update panels triggers, the image background disapears when using IE but the same page viewing it in Firefox doesn't do that...

the webpage is this one:

www.cantinadoimbriaco.com/congelados/produtos.aspx

can some one help in what i'm doing wrong... thanks...Hi,

which image background is disappearing? It seems OK on IE for me.
Well it has a image background, and the menu has a fill background, as well as the submenu has an image background...

When changing to another submenu category the image of those backgrounds disapears, viewing it in IE... does any one sees it or just me?

Atlas update panel request timeout

I have annoying problem. Page has EnablePartialRendering="true" and several Update panels. Page works fine if Request is short, bit some time it can take up to 5 minutes to finish respond, and in this case, page does not return anything. I guess it has to be some TimeOut async request reaches. I tried to set <pages asyncTimeout="600"> - it does not help. Would appreciate any advise.

hello.

use the scriptmanager's AsyncPostBackTimeOut property to define the timeout associated with a partial request.


You may also consider manually calling the update panel .Update() - if its a long request and on the browser side its taking awhile - you could do this:

<Update Panel>

<Panel id="pnlForm" >

insert control here or whatever

<Panel if="pnlStatus">

Display message will take a while - do not navigate from page...

write a short javscript method that when you know it will be a long request... will toggle on the postback the second panel...I suggest using the style='display:none' instead of the .net visible = true or false...

Then in code behind do your work and at the end reissue the css style select to trigger them back to original status...and then call the updatepanel.Update()...

That may work as a solution for something of that time period...Since we are talking asynch - and you have other update panels - this should theoretically allow other stuff to happen - and still handle your first request.. I don't know for sure if that will work

I have noted that even setting the asynch timeout - with IE in particular it will not process a direct postback after x period of time...

But - I do think a better solution - is to figure out why it takes 5 minutes to perform something for a web client. If its a report generation - then the best thing to do is write kinda a job queue that stores the results - and has a status flag it updates... then on the web client poll the job status and when available trigger the update for the update panel...


Hello

I don't see AsyncPostBackTimeOut among ScriptManager properties.

Thanks


If you are using Atlas - I don't think that property existed - its a property of the new Beta however...

Wednesday, March 21, 2012

ATLAS replacing redered control ids incorrectly

I have multiple update panels on a page. When i fire a control event inside one of these panels, i get an alert window saying something like:

"An async postback was caused by a control within $ctl0$myPlaceholder$myUpdatePanel . . . but the update panel could not be found on the page."

when i view the source in my code, however, the actual id or name of the div that is the rendered updatepanel is "_ctl0_myPlaceholder_myUpdatePanel".

I am not sure why this is happening. has anyone seen this before? suggested fixes?

Hi,

you should view posts at:

http://gregdotnet.blogspot.com/ - about web.config element xhtmlconformance and
http://forums.asp.net/thread/1211330.aspx - about naming the controls

Basicly what you need to check is that if you have any dynamicly added controls assign them id's when they get added to the controls collection. This way the control id's at runtime don't get rendered with ctl04_ and such. Worked for me.

Atlas postback very very slow.

Hi i have a web app and most of the pages work fine, but i have two that are responding very slowly. I use Atlas update panels on the page so i thought if anything the responce would be quicker.
The postback is not doing a great deal. all i am doing is selecting a link button on a grid view which has the command='select' property. Within the row_command event all i am doing is changing the state of a couple of buttons on a seperate update panel.

The buttons act equally slow, they perform more code but still not a 4/10 sec round trip as i have other buttons that do more yet postback faster.

Any thoughts appreciated.

Steve

Hi Steve,

Can you check two things:

1) Are you running the app in debug mode? If so, the Atlas script libraries get downloaded on each request -- and that might be one cause of the delay.

2) What is the size of the viewstate on the page that you are working on? It could be that you have a lot of viewstate on the page which is slowing it down. Disabling viewstate would make postbacks work much faster.

Hope this helps,

Scott


Hi Scott

Thanks for posting.

I dont have it in debug mode.

How would i find the size of viewstate?

Steve


Scott

I disabled view state and the datagrid came back empty. The grid is only 1 col which is a template field with a link button in.

Steve


I have just done a view source on the two pages in question.

One: Viewstate = just short of 45000 chars.
Two: Viewstate = just short of 9000 chars.

So i guess thats the problem?? I am guessing that to cure the gridview coming back blank i will need to rebind on each postback?

Steve


How do i use properties like selectedindex from the gridview when viewstate is disabled??


You can use ControlState instead, which acts a lot like ViewState except that it's never turned off. Seehttp://msdn2.microsoft.com/en-us/library/system.web.ui.pagestatepersister.controlstate.aspx for more information. I'm not 100% sure you can enable at the page level as its supposed to work on controls, but then again a page is just a control

HTH
Thanks

How do i use the selectedindex from control state?

Steve

i use selectedvalue all over the place. Without creating my own control from the gridview is there anyway i can use this value.
I guess the selectedindex would work i could put the id in a hidden value and get it that way BUT... with view state turned off on the gridview i am unable to get the selectedindex, i thought selectedindex was held in control state....is there something special i need to do to use the control state properties?

Thanks

Steve


OK got it sorted.

on rowdatabound i have done e.Row.EnableViewState=false;
this has reduced the viewstate from 50K chars to a little over 6K. And I can access selectedvalue OK.

Time to stick it up live and see how we go.

Thanks, Steve