Showing posts with label release. Show all posts
Showing posts with label release. Show all posts

Monday, March 26, 2012

prevent asp:ImageButton from refreshing image...

Is there a way (with the Dec release) to prevent the image in an image button from refreshing when posting back to the server in an UpdatePanel?

It would seem to defeat the purpose of Ajax to have this image refresh all the time during a post to the server...

Wade.

The idea would be to keep the image button outside the updatepanel so it is not refreshed when the page is posted back.

- Kashif


Actually the behavior is browser dependent. Internet Explorer seems to refresh images by trying to go to reload the image, while Mozilla seems to cache images completely locally and without that funky flash.

In IE if you replace content that contains images references (as UpdatePanel will do) all the images reload. Usually they will come from Cache so it's pretty fast, but there's still some amount of flash. If you use FireFox you don't get that flash. You can hook up Fiddler or other HTTP proxy to see this behavior.

Certainly makes for smoother operation of any sort of callback in FireFox.

+++ Rick --


The best method is to have a script manager control on the page with 'Enable Partial Rendering' set to 'True', and then only put the parts of your page that would be updated on a page refresh within the UpdatePanel controls.

So if you don't want the image to 'blink', it's best to leave it outside of that control.


This is a problem that is currently driving me nuts. I have a large UpdatePanel that has a tab control on it. The tabs are painted using image backgrounds defined in a stylesheet. In IE, using Nikhil's web dev tool, I can see that for every tab all the images are requested and the server responds with code 200. It's like IE's local cache is completely ignored. This is causing an ugly flicker and some repaint issues. I've tried the max-age cache control-cache extension but it doesn't seem to work. I found the best information athttp://aspnetresources.com/blog/cache_control_extensions.aspx.

Does anyboy have any ideas?

This bug is going to kill me too. all the images on the page even those are outside the updatepanel and wrote with <img> tag are flikering too.

Any solution to resolve this problem?


The image flicker has nothing to do with ATLAS - it's an IE bug - IE is refreshing the images when it shouldn't. You can fix that by changing your IE cache settings. I think it happens if you have your cache set to refresh on every page hit. IE apparently considers the partial XmlHttp postback as a page refresh and refreshes all content in the page. Put IE back to auto caching and the flickering should stop.

+++ Rick --


Dear Rick

Thanks For Comment

My IE Caching was set to Auto Already, and here still the killer bug.

Any other Idea?

H.B.F


Hello. This is a bug in IE when it's pulling in background images defined in CSS. As far as I am aware, the solution lies within IIS. Have a read of this: http://erik.eae.net/archives/2007/02/26/13.13.48/

cheers
Anthony

print button of Crystal report 11.5 didnt show pop-up dialog with AJAX

I have developed one web application with ASP.Net 2.0 with AJAX 1.0 and Crystal Report 11.5 Release 2.

When i put Crystal Report viewer in AJAX's update panel, Crystal report viewer is opened properly, but when i try to export or print the report from Crystal Report viewer, it is not showing any dialog box for export or print. Print mode of Crystal report viewer is ActiveX.

Can any body help regarding this problem with example(if possible) ?

Regards,

Krunal Shah

http://forums.asp.net/thread/1325110.aspx
(UpdatePanel does not allow the CrystalReportViewer control to print or export.)

http://forums.asp.net/thread/1660467.aspx
(button inside update panel Firefox problem)

etc., etc.

Saturday, March 24, 2012

Problem after upgrading from November 06 release to January 07 release.

I have a web site that was working beautifully with the November 06 release. I then upgraded to the January 07 release, and for the most part, everything is working as expected, with 1 exception.

I have a custom composite control which is basically a custom gridview that has a textbox column added at the end. The TextBox has a MaskedEditExtender. Both the TextBox and MaskedEditExtender are within an UpdatePanel. The GridView is also in an UpdatePanel. The idea is to have the GridView do paging via AJAX, and the TextBox update a shopping cart control with quantity without refreshing the whole GridView. The shopping cart is also contained in an UpdatePanel to reflect the new item added without a refresh.

First time the page loads, everything works correctly. If I then go to a different page of data, then enter a quantity in the textbox column for an item, I get the following javascript error:

Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method

I have confirmed that the TextBox's TextChanged event is indeed getting fired, but it dies with the above error at some point after that.

I am at a complete loss as to how to track down this problem. I would post my code, but there are several hundred lines of it for both the control and the page, and I didn't think it would be a good idea to try.

I would REALLY appreciate any help or suggestions on how to fix this, or at least, locate the source of the problem.

Thanks,

Alex

Just some additional info. As a test, I set EnablePartialRendering = "false" for my ScriptManager, and the site works properly without errors (but, of course, it now does a full postback).