UpdateControls: UpdateHistory and AnimatedUpdatePanel

Two controls that go along with the UpdatePanel and partial rendering features in ASP.NET Ajax: UpdateHistory and AnimatedUpdatePanel.

Finally, I've updated the UpdateHistory control, so it works against ASP.NET AJAX 1.0. I've gotten numerous emails asking about when I'll be doing this. Thanks for the interest! The package contains the following controls, which includes the initial release of a couple of new controls.

UpdateHistory
This is a non-visual control that allows you to add history entries to the browser's navigation stack selectively for some post-backs, and not for some others. This helps fix the back button to make it work, and allows you to implement Ajax patterns such as "logical navigation" and unique URLs.
StyledUpdatePanel
A simple derived UpdatePanel that adds CSS class semantics. A simple addition, but a useful feature, nevertheless, that didn't make the feature cut.
AnimatedUpdatePanel
Another derived UpdatePanel that displays new content using a variety of animations or effects: slides, wipes, cross-fades as well as a visual highlight. This allows you to implement the "visual notification" Ajax patterns such as the one second spotlight and one second mutation.

Downloads: Binaries, samples and source code | Video on Channel9

I've blogged about using UpdateHistory when I first wrote about adding back button support for the UpdatePanel/partial rendering approach for adding Ajax functionalty. Instead of repeating that information here, I'll scope the rest of this post to the AnimatedUpdatePanel.

Using an AnimatedUpdatePanel is really straight-forward. Simply replace <asp:UpdatePanel> with <nStuff:AnimatedUpdatePanel>. Here's a snippet from the sample accompanying the control, that causes performs a cross-fade between old and new content over 1 second.

<nStuff:AnimatedUpdatePanel runat="server" CssClass="content" AnimationType="CrossFade" Duration="1000" />

Check out the included samples, which demonstrate some other effects as well. One thing to be look for are the styles referred to by the CssClass and HighlightCssClass properties. These classes can be used to customize the look and feel of the content. In particular, the background-color and z-index are significant in terms of how new content, old content and the highlight rectangle interact to produce the final rendering.

Hidden behind this simple usage model, the script works against the client-side page lifecycle, and manipulates the DOM so as to update the page in a more visually pleasing manner. The thing that distinguishes this from other animated UpdatePanel effects you might have seen is that this implementation provides the ability to overlay the new content over the old content; as the new content slides in, wipes in or fades in, the old content slides out, gets wiped out, or faded out.

With this super-simple usage model, it may be tempting to do a global search and replace. That is probably not a good idea. You'll want to think about which updates benefit from animated effects and transitions, and which ones are actually distractions or annoyances. It all depends on the app, and the individual pages.

The control provides a small set of animation options. Personally, I think you really don't need a super rich (and bloated) animation framework, especially considering that you'll want to animate over short durations. A good rule of thumb is find a duration that is good for demo'ing the effect, and then use 1/2 that value for real. Think about the actual user, who isn't looking at your demo, but actually using your site - sitting through slow animations repeatedly is excruciating! The goal of the animation is to provide subtle cues about what is changing; it shouldn't become the focus in and of itself unless that is what the app is all about. Keeping the animation framework relatively minimal creates a constraint that helps facilitate that.

Currently these controls work on IE and Firefox. As always, comments are welcome.

Update 4/13/07: I have posted v1.1 of this control pack, which includes various bug fixes, as well as a new UpdateAction control. See the associated blog post for more details.

Posted on Monday, 2/5/2007 @ 1:41 PM | #Projects/Programming


Comments

78 comments have been posted.

Morten

Posted on 2/5/2007 @ 2:50 PM
Cool.
...but there seems to be a small bug with the history control (observed in IE7 and FireFox 2).
When I'm running your demo app, and changes the page from /default.aspx#1 to /default2.aspx#1 (that is, preserving the #1 anchor), the anchor doesn't get updated when I change my selection in the dropdown. The problem does not occur if I start the page without the anchor. I guess this is a somewhat serious bug, because it will render the historybutton useless for everyone who bookmarks the page with an anchor.

Steve Trefethen

Posted on 2/5/2007 @ 5:13 PM
Hmm, isn't requiring the install of a beta control just to view the video going a bit too far to push the WPF/E technology? I'd like to see the video but I'm not going to install a beta of the control just to do it.

Elijah Manor

Posted on 2/5/2007 @ 5:47 PM
Wow! This is exactly what I am looking for... and I wasn't even looking for it :)

I just implemented Microsoft AJAX on our production site and one of the first issues that was logged was the back button behavior.

I look forward to looking at your UpdateHistory control and checking out your other two controls.

Keep up the great work!

Nikhil Kothari

Posted on 2/5/2007 @ 6:03 PM
Morten: Thanks for pointing it out - I'll try to repro it and see whats up when I get a chance.

Steve: You can visit the channel 9 site, and see the video using windows media player. I am not trying to push beta technology... it is something that works for me...

hidra

Posted on 2/5/2007 @ 6:47 PM
but..... not use with masterpage .....

robsworld

Posted on 2/5/2007 @ 6:50 PM
Hi there,

Great controls I was wondering if u could give what are the possible values for the AnimationType also is it possible to set a property to have the colour stay on for the region where an update has occurred for example if you have an error message it would be nice to have it flashing red then stay highlighted red or have a red border to indicate this. Another possible reason for this is the animation might not be present on the screen it could be towards the bottom of the screen and the user might not know something has been updated

Steven Smith

Posted on 2/5/2007 @ 7:36 PM
Not to belittle these in any way, but is there a reason why you opted not to include them in the AJAX Control Toolkit?

Also, your captcha isn't entirely clear on the fact that you must use the Refresh *button* below it for your input to be preserved. Refreshing the browser (as one will do if they do not see the button) does *not* preserve one's input...

Jeffrey McManus

Posted on 2/5/2007 @ 8:19 PM
Would love to check this video out; could you please make it available in some non-marginal format?

Nikhil Kothari

Posted on 2/5/2007 @ 8:49 PM
hidra: You should be able to use this just fine with master pages - you'll want to have just one UpdateHistory control... presumably in the master page.

robsworld: The Animation types are CrossFade, Highlight, SlideDown, SlideUp, WipeLeft, and WipeRight. These should show up in intellisense or in the property grid in design view. You can change the highlight color, etc. other appearance related properties of the highlight rectangle using CSS, and the HighlightCssClass property. Email me offline via my contact page if you've got other scenarios to explain in more depth. Your comment about something being offscreen gives me another idea to add to the UpdateControls pack. Stay tuned for a future blog post on that.

Steven: Personal preference on the question about the control toolkit.

Jeffrey: Please see my comment above - I did point to where you can view the video using media player. The wmv format isn't exactly what I'd call marginal... however, the media player isn't the best control to embed esp. if you want your pages to work on the mac. The WPF/E player fixes those issues.

Philip the Duck

Posted on 2/6/2007 @ 5:05 AM
I have WPF/E Feb CTP installed, and this page works fine in IE7 but shows an empty black rectangle (of approximately the correct size) in FF2 - am I missing an extra WPF/E bit for FF2?

Oskar Austegard

Posted on 2/6/2007 @ 6:36 AM
Philip the Duck - I have the same problem. Not sure what I need for FF2.

Also, when I switched to view the page in IE7 the page took quite a while to load, then it appeared all at once. My thought here is that the table-based layout of this page requires the entire content to load (including the WPF/e video) before anything is rendered. Nikhil - you might want to look into a CSS/DIV based approach, or inject videos like this through js upon page load...

George Kapsambelis

Posted on 2/6/2007 @ 8:30 AM
Nikhil, thanks so much for these controls and especially distributing them under the Creative
Commons Attribution-ShareAlike license. I've learned so much from you and others in the community. It has saved me countless hours of toil and has really helped me understand and promote the technology to others. Thanks again and keep up the great work. :)

Tom

Posted on 2/6/2007 @ 9:19 AM
Nikhil,
The cross-fade update panel is just what I was looking for to make my photo album, however I'm running into a few problems with positioning. The control seems to want everything lined up in the top left corner, but for a photo gallery which switches between landscape and portrait images, I think it looks best centered.

Any way to set some positioning attributes with the animated update panel?

Thanks!

Michael

Posted on 2/6/2007 @ 9:39 AM
The history control has to be in the Master page? I guess that makes sense but definitely a bit more challenging to implement as the history is almost always going to be based on something in primary page and will likely be different for each page. :(

Thanks for your work on this though!

masthy

Posted on 2/6/2007 @ 11:09 AM
Nikhil, thanks a lot for this. Really looking forward to get this to work..

At the moment, i'm experiencing a javascript-error: Sys.ArgumentNullException: Value cannot be null. Parameter name: postBackElement.
I never did see this exception before i added the UpdateHistory-control.

The back-button is enabled while navigating, but only the exception is thrown when i try to hit the back/forward buttons... My eventhandler for the OnHistoryNavigate event never hits...

Any ideas what may be wrong?

Nikhil Kothari

Posted on 2/6/2007 @ 11:11 AM
Tom: You can create a div that contains the image centered within it, and have the whole div be within the UpdatePanel. For the animations to work, the assumption is that the content of the UpdatePanel (your div) is positioned at 0,0. Btw, I know what a design/layout pain horizontal and vertical images create... :-)

Michael: The requirement is that there is only one history control. Depending on how you do things, it could be inside a content page, but on master page scenarios, if multiple content pages want to use the History control, you'll need to pull it out into the master. Think of it as a control that offers a history service. In the next iteration, I'll add a static GetCurrent method (ala ScriptManager) and that should simplify the usage.

Mike

Posted on 2/6/2007 @ 11:13 AM
Definitely pushing the wpf/e a bit too much here. But otherwise good work. I would just like to add that I don't need this control, since all the mainstream browsers I test already have built in history. Basically comes down to not using Ajax for navigation, only RPC scenario's.

Noral Kuhlmann

Posted on 2/6/2007 @ 2:17 PM
Is the video suppose to have sound?

Nikhil Kothari

Posted on 2/6/2007 @ 3:07 PM
Wow, theres just as much response to WPF/E as there is to the content of the post! Yes, the video is a wmv (without any audio), which you can download and view in whatever way pleases you. Yes, I used WPF/E because it seemed where I want to go in terms of technology used to display videos. No, the choice isn't being driven by a goal to push WPF/E... certainly my blog doesn't have enough readership to accomplish that. :-)

Mike: No one is arguing for replacing navigation with AJAX. But there are many scenarios where you have multiple logical views on the same page (often based on some selection in a list on the page), where you update the page in response to user actions. Those qualify for back button support.

smith..

Posted on 2/6/2007 @ 5:35 PM
it's so coooooooool.. but not use masterpage ..i'm trying so many ..but fail..

Daniel

Posted on 2/7/2007 @ 4:46 AM
In my opinion, these controls are essential for all Ajax work.
Just wanted to see them somewhere where community could give better feedback (CodePlex...).
I am looking forward to seeing other improvements to these controls.
As always, genius work Nikhil, but I feel like community should start contributing at this point?

Justin

Posted on 2/7/2007 @ 7:58 AM
I was just able to verify that this control does not seem to work with master pages.
I attempted to use the UpdateHistory control on a page in my project that uses a master page, and the URL was not changing with the new history object, and the OnNavigated event would not fire properly either. I attempted this both with the UpdateHistory control in the master page as well as in the content page using the master page.
I copied the exact page over to another test page (same project) that didn't use the master page, and it worked perfectly, updating the URL and firing the OnNavigated event.
If you would like to see my exact code examples, I would be more than happy to provide them.

Nikhil Kothari

Posted on 2/7/2007 @ 10:07 AM
Daniel: Feel free to provide feedback either via comments, or via my contact form. Also, feel free to suggest improvements... I am all ears.

Justin: I will try out the masterpage scenario. If you think it would help, could you send the sources for your masterpage and content page via my contact form.

Scott

Posted on 2/7/2007 @ 11:19 AM
I agree with Daniel.... At this point Microsoft needs to either move forward with this project or make it open source and let the community start building on it. I think it's one of the best tools at a web developers disposal.

Steven Berkovitz

Posted on 2/7/2007 @ 12:46 PM
To resolve the MasterPage issue, in the GetScriptDescriptors() method change UniqueID to ClientID

Steven Berkovitz

Posted on 2/7/2007 @ 1:49 PM
OK ignore that last post - doesn't seem to work as well as I originally thought.
The problem seems to be when the async postback is trying to resolve the postbackElement, which since the control is non-visual, doesn't exist...

Daron Yöndem

Posted on 2/7/2007 @ 1:58 PM
I didnt try the "Master Page" problem but I had the same error -Sys.ArgumentNullException: Value cannot be null. Parameter name: postBackElement.- in a normal page with one ProgressBar and one UpdatePanel on it. When I remove the ProgressBar it works well. In addition the most interesting solution was to set my projects debug= true web.config entry to debug=false. When the debug attribute is false I'm getting no error with actually nothing. So there are 2 choices :)

1.Remove ProgressBar
2.Make it debug=false

My code has nothing special. Running on IIS 7.0, AJAX v1.0. I have same results on all situation on ASP.NET Development Server as well.

Finally.. I want to thank you Nikhil for the good work. All at all it works like a charm. I will introduce your control in my AJAX book which will be published soon in Turkey :)

Kenneth Nilsen

Posted on 2/7/2007 @ 3:31 PM
This control is exactly what I need! Thanks. Oh, BTW: to the WPF/E "debate" - guess Flash is a better choice when it comes to video-technology on web.. ;-)

Peter Müller

Posted on 2/8/2007 @ 12:30 AM
These Controls are greate!!!! But I've got one problem with your dll. All my other Code and dll's is signed and has a strong name, so I can't use your dll as it is. Are you going to publish one which will be signed?

Rudolf Wenger

Posted on 2/8/2007 @ 12:55 PM
i have a problem with the AnimatedUpdatePanel. when i resize the browser window, the gridview inside the AnimatedUpdatePanel will not change he's size. in the same scenario with a regular UpdatePanel this problem not exist. any ideas?

Joe B

Posted on 2/9/2007 @ 2:29 PM
Nikhil, really cool controls.

I am playing around with the animatUpdatePanel and ran into a minor issue when I have other Ajax controls inside the panel.

for example if I add a FilteredTextBoxExtender I get the folowing Error: Sys.InvalidOperationException: Two components with the same id ctl100_ContentPlaceHolder1_FilteredTextBoxExtender1 can't be added to the application

For each Ajax control I add I get an error when the panel updates.

Anyone have any ideas I wasn't able to get to the video yet so maybe I am missing something.

Tri Phan

Posted on 2/12/2007 @ 1:20 PM
Nikhil,
I think we still get the same problem with masterpage when trying to add history control to my website. It seems like do nothing. I tried to work around including changing UniqueId by ClientId, the back button then became active, but it didnt functioned as supposed. Can you help fixing this problem? I highly appreciate your contributions. Thanks.

Tom

Posted on 2/13/2007 @ 6:52 AM
Nikhil,
I'm having trouble using the UpdateHistory control in a user control. I converted the example default.aspx page to a control, keeping the scriptmanager and the updatehistory controls within the ascx. The histories do not seem to get written (the url does not add an anchor). But, if I pass through an anchor in the URL, the navigation does work. Do I need to do something different to use UpdateHistory in a user control?

Thanks for the help!
Tom

Nikhil Kothari

Posted on 2/13/2007 @ 4:39 PM
Just a quick heads up - I am reading the comments, and I will be looking at various bugs that have been reported some time this week, and try to get an update out asap.

Damir

Posted on 2/16/2007 @ 2:49 AM
I tried to make UpdateHistory work for my site for few hours this morning with no much success (with no master pages)... When I tried to Google it, I found following post which explained few things: forums.asp.net/thread/1551688.aspx

It's not master pages after all...

Otherwise: this is one very helpful control. Thank you, very much :)

Damir

Posted on 2/16/2007 @ 2:55 AM
And please, Nikhil, add somewhere list of forbidden words... I've been trying to post above comment for more than half an hour (it's really not my day today ;)).

I couldn't because link to that forum post started with "h t t p : / /". All I got was "Your comment contains some unallowed words". Maybe it's something else, but I don't know now, do I :)

Jordao

Posted on 2/23/2007 @ 12:28 PM
I ran into the same problem as Morten. Urls with hashes can't be bookmarked. If you navigate initially to a page with a hash, the whole history functionality doen't work. I tried to peek into the source files, but you js files are obfuscated.... Please take a look at this issue.

Shrikant

Posted on 2/26/2007 @ 4:43 AM
I tried to use this functionality within the user control, it did not work for me.
Is there any setting to be done.

I wrote the code on Default.aspx page into an .ascx page....no other changes were done.
am I missing a trick???

Zak

Posted on 2/27/2007 @ 9:16 AM
1) MAD praise for this control. It's extremely easy to use and very powerful.

2) I do have one gripe/request. The Crossfade animation creates a sort of jumbled mess while in transition. I would love to see one called FadeOutIn that simply fades out the first content and brings in the new separately, in your same one second timeframe. I think it would look more elegant while not bloating the code overmuch.

Chris

Posted on 3/5/2007 @ 12:29 PM
Any news on a master-page fix? I tried the UpdateHistory control on a regular page and it worked great, but when I moved the code to a page with a master page then it didn't do anything anymore...

Chris H.

Posted on 3/8/2007 @ 12:16 PM
Nikhil,

I stumbled upon the UpdateHistory control looking for something that I think is slightly different. I have a GridView loaded within an UpdatePanel. The GridView works fine and all is well... BUT, if I navigate away from a GridView full of results, then hit my back button, the Gridview is now freshly loaded, and empty. Your thoughts on how the history can be properly maintained?

Regards,

Chris.

Tom

Posted on 3/13/2007 @ 12:17 AM
Hey Nik-

first of all: great work. It is really a nice control and very useful in the ajax world (esspecially to solve the backbutton problem). So if the bugs concerning master pages and user controls are fixed, you got three thumbs up from me. So can you say something about the bugs? Are you on it?

Greetings -


Tom

James

Posted on 3/13/2007 @ 12:25 AM
Is asp:UpdateProgress and UpdateHistory controls are not compatible with each other?..I am getting an error if i am using both ...when i clcik back it is giving an error...

Rob Cameron

Posted on 3/13/2007 @ 5:18 AM
Hi Nikhil, great sample controls. Keep them coming:-)

James

Posted on 3/13/2007 @ 6:49 AM
Nikhil...
can u pl help me out...

Is asp:UpdateProgress and UpdateHistory controls are not compatible with each other?..I am getting an error if i am using both ...when i click back it is giving an error...

Regards,
James

Chris Cottrell

Posted on 3/13/2007 @ 7:18 PM
Nikhil, nice work. Not sure where you are with the Master Page issue. I am probably going to spend a few minutes tomorrow morning getting into your code to see if I can debug. If you have a solution or are close, please let me know. I know how you can be taken away. I'll let you know if I see anything myself.

By the way, for those asking for a signed version of the dll, you CAN do that yourself - he gives you the code. Actually, I woud highly suggest you open the project, sign it, and build yourself an optimized release version. So many people don't get that concept. Thanks!

Mike Chamberlain

Posted on 3/14/2007 @ 7:01 PM
Would really like to see this working within a masterpage. I get the same issue as many other people who have commented - the sample works fine as it is but does not when it is in a page that uses a masterpage.

Nothing is ever simple with AJAX!

Ariel

Posted on 3/25/2007 @ 8:17 PM
Hi,
I have the same problem that Morten reported you.
When I'm running your demo app, and changes the page from /default.aspx#1 to /default2.aspx#1 (that is, preserving the #1 anchor), the anchor doesn't get updated when I change my selection in the dropdown. The problem does not occur if I start the page without the anchor. I guess this is a somewhat serious bug, because it will render the historybutton useless for everyone who bookmarks the page with an anchor.
It's a great piece of work, Thanks!

Bobby Kotzev

Posted on 3/27/2007 @ 1:46 AM
I think I found a solution for the problem Ariel posted on 3/25/2007 "...changes the page from /default.aspx#1 to /default2.aspx#1 (that is, preserving the #1 anchor), the anchor doesn't get updated when I change my selection in the dropdown...". It looks like when a page containing an updateHistory control is called with an anchor, the js script do not run the full initialization code. So to fix that :

in scripts/updatecontrols.debug.js go to line 414 and comment out the " else {". Also comment out line 425 which is the closing bracket.

to fix the release script (scripts/updatecontrols.js) go to line 56, col 1172 and comment out/delete the "else{". The closing bracket is at line 56 col 1575 so comment out/delete it as well.

Ariel

Posted on 3/29/2007 @ 8:15 PM
Dear Bobby, thank you for your help.
Are you sure about the line and col that you mention in the release script?
I don't see any bracket at that place.

Thank you

Alan

Posted on 3/30/2007 @ 4:02 PM
I am trying to implement the UpdateHistory. My problem: onthis line:
protected void OnUpdateHistoryNavigate(object sender, HistoryEventArgs e)
Visual studio tells me: "The type or namespace name 'HistoryEventArgs' could not be found"
What do I need to add?
Thanks

Bobby Kotzev

Posted on 3/30/2007 @ 4:56 PM
"Are you sure about the line and col that you mention in the release script? I don't see any bracket at that place."

for the release script only:
- search for "if($0!==this.$1_A){this.$1_D($0);}", the "else{" is right after this string.
- search for "this.$1_1=Delegate.create(this,this.$1_11);this.$1_0=window.setTimeout(this.$1_1,100);". there are two '}' after this string, comment out/delete only one of them.

Also if you managed to fix the debug stript you can also just copy/paste its source in the release one. That should work to until the next build.

BTW just wanted to thank Nikhil for his great work on making this components

RexM

Posted on 4/3/2007 @ 8:28 AM
UpdateHistory is a great control. Works like a charm, except when I use it in a master / content page setup.

Has anyone managed to get that to work?

I have tried it in the example project, would you like me to mail it to you, Nikhil?

car transport, auto transport Highline Transport

Posted on 5/14/2007 @ 4:32 AM
car transport, auto transport, car shipping, vehicle shipping, car shipper, vehicle shipper
Houston car transport, Houston Texas auto transport, Houston vehicles transport, Texas car shipping, Houston vehicle shipping, Houston auto shipping

Ron Shir

Posted on 5/16/2007 @ 10:58 PM
The AnimatedUpdatePanel is great when it works as I expect, but I've got two odd issues:

1) Other AJAX extenders stop functioning after the first update via the AnimatedUpdatePanel. I have a page with a CalendarExtender and a ConfirmButtonExtender which work fine when the page first loads. After the first update, though, it's as if they aren't there. No errors, but the functionality is gone. This is all on my local machine.

2) When I move the project up to my hoster (GoDaddy) I get this error on the page load: "System.Security.SecurityException: That assembly does not allow partially trusted callers." I've done a bit of research on that error, but frankly I'm just not understanding what I'm reading.

Any thoughts? Thanks for all your hard work!

Raul Martinez

Posted on 5/23/2007 @ 4:12 AM
Hello All.

The first of all Thanks for your "Update History" control.But I have a problem with it.

We've updated our project and we have added the UpdateHistoryControl inside some pages.
When we add the control inside normal pages (not inside the master page) all is working OK.
But when we add the control in pages inside the master pages (<asp:Content) and we build y receive this message:

"Warning as Error: Type of 'FranchiseeProfile.FptMain.updateHistory' is not CLS-compliant "

What can I do?How can I fix it ?

All the best anf thanks for all Raul

Raul Martinez

Posted on 5/23/2007 @ 4:13 AM
Hello All.

The first of all Thanks for your "Update History" control.But I have a problem with it.

We've updated our project and we have added the UpdateHistoryControl inside some pages.
When we add the control inside normal pages (not inside the master page) all is working OK.
But when we add the control in pages inside the master pages (<asp:Content) and we build y receive this message:

"Warning as Error: Type of 'FranchiseeProfile.FptMain.updateHistory' is not CLS-compliant "

What can I do?How can I fix it ?

All the best anf thanks for all Raul

car transport, auto transport Express Auto Shipper

Posted on 5/28/2007 @ 12:57 AM
car transport, auto transport, auto moving, car moving, car shipping

Sreenivas Kaushik

Posted on 6/8/2007 @ 12:53 AM
Hi Nikhil,

Really its a nice blog.

I am facing some problem and i just wanted to know how can i handle the issue?

Problem:

I have two aspx (ASP.NET 2.0) pages 1) A.aspx and 2) B.aspx. If i navigate from A.aspx to B.aspx with the default values and click on the Browser Back Button then Page navigates back to A.aspx.

If I change some data in the A.aspx page and (if that page has postback) and navigate to B.aspx and click on the Browser Back Button I am getting the Message as "Web page has Expired" instead of navigating to the A.aspx. My requirement is to send it back to A.aspx.

I tried with the "Do not save encrypted pages to disk" option in the Security settings of the browser but still the problem persists. Is there any way get rid of this issue either through coding or through browser setting of through any fixes ?

Thanks & Regards,
Sreenivas Kaushik

Dave

Posted on 6/24/2007 @ 5:24 AM
Hi Nikhil

Great work on these controls. I have them working in Master pages using the following pattern:

1. UpdateHistory control in Master page file.
2. I use a BasePage class which all my pages extend.
3. The BasePage holds a reference to the UpdateHistory control on the master page (this is just for ease).
4. Any page (or control) needing to hook into the Navigate event will use something like: Page.History.Navigate += new HistoryEventHandler(OnUpdateHistoryNavigate);

This works fine except when navigating through some ajax tabs (for example) then using back button to go back to a previous page. It will navigate back through the tabs but when leaving the page I get an "Error: Sys.ArgumentTypeException: Object of type 'Array' canot be converted to type 'Boolean'. Parameter name: condition"

This error is occuring in ScriptResource.axd in the Sys$_Debug$assert method.

Any help you could could give would be greatfully received.

Thanks
Dave

houston website design

Posted on 7/5/2007 @ 6:14 PM
houston website design, houston search engine optimization, corporate identity design, logo design, houston e-marketing, houston website promotion, houston website coding

Jits

Posted on 7/26/2007 @ 6:06 AM
Hi Nikhil...

Super stuff!

I'm using v1.2 of the UpdateControls and I seem to have come across a bug: when you have a CollapsiblePanelExtender within an AnimatedUpdatePanel (with animation style 'Highlight'), it doesn't expand properly - it expands over the content after the AnimatedUpdatePanel, instead of dynamically moving the content.

Any thoughts? I'd be very grateful of any help you could give.

Cheers,
Jits

jk

Posted on 8/6/2007 @ 9:00 AM
For the UpdateHistory, if you are pulling data from a database based on say a selected item from a dropdownlist. Won't you have to set the selectedindex and then re-query everytime on a back button click? Am I missing something.

Josh

Posted on 8/7/2007 @ 6:32 PM
Sorry but it seems you havent answered the masterpage problem in a long time, have you forgotten this blog?
Its a critical time for me and I need to know if this will ever be working in a masterpage scenario.

Express Auto Shipper car transport, auto transport

Posted on 8/22/2007 @ 1:52 AM
car transport, auto transport, auto moving, car moving, car shipping

Company’ name:
10924 Grant Rd. Ste 237
Houston
Texas
77070
832 235 3651
281 807 5516

ABC Communication & Advertising & Advertising

Posted on 9/27/2007 @ 12:00 AM
Dich thuat, dich thuat van ban, phien dich, thong dich, bien phien dich, thong dich vien

Liên hệ
482/51/9 le Quang Dinh ,F 11,Q Binh Thanh
482/51/9 lê Quang Định ,F 11,Q Bình Thạnh
TP Ho Chi Minh
tel: (848) 5158499
(848) 2978144
(848) 5158500
fax: (848) 2978143
dichthuat@dichthuat123.com

Ryan Heath

Posted on 10/4/2007 @ 1:09 AM
Hi Nikhil,

These controls are awesome!
One request, though, is it an idea for the historyControl to not postback when the anchor is a genuine anchor?
In other words, when document.getElementByID(enrtyName) exists, do not postback?

// Ryan

Clas Peterson

Posted on 10/10/2007 @ 1:40 AM
Is there a way to use the UpdateHistory control with a DataList instead of a Dropdown list?
Ive been trying but can not really get it to work.

lily

Posted on 1/9/2008 @ 12:35 PM
How do I make it run on my computer?

Ben

Posted on 1/18/2008 @ 2:31 AM
Hi, I have no problems working with the updatehistory control in a masterpage... It goes in the masterpage after the scriptmanager control. Master page exposes the updatehistory control as a property, and every contentpage that uses this masterpage inherits from a custom page class with 'public mustoverride sub onnavigate(sender,eventargs)'. You need to have onnavigate overridden in every page that inherits the custom page class otherwise you get a weird error when the page first loads. To add a history point, call master.updatehistory.add(string).
Simple.
Currently i'm looking at rewriting parts of it so it has various switches- firstly, i need to be able to selectivly disable it, as some pages should not have any back/forward control at all; and secondly, i need to be able to selectivly turn off the response when it isn't a postback- some pages work like wizards and so if it isn't a postback, you should always be taken to the first stage, whatever stage you bookmarked.
Now, if i can only get it to put the actual page title for each anchor point in the browser history, rather than the title from the first stage, or 'invalid reference', i will be one happy bunny...

Neeraj

Posted on 2/1/2008 @ 5:30 AM
Hi,
I am new user for asp.net ajax. i have download this control its running fine but i have not implement successfully with my application.

I have two dropdown. one for country and one for shipping value. when country select then shipping info fillup with some calculation.

Pls give me a example for solve my problem. i know its small one i need this
Thanks

Mads Brockhuus

Posted on 3/13/2008 @ 6:31 AM
Hi,

We are happy that the historyback now works in our updatepanels. But we have to turn of google analytics in our ajax pages, otherwise historyback doesn't work. We are using the old urchintracker. Has anyone tried the new google analytics ga with updatehistory?

Mads Brockhuus

Posted on 3/14/2008 @ 1:43 AM
Problem solved

jignesh prajapati

Posted on 3/28/2008 @ 12:36 AM
Hello,sir.I use your animatedUpdatePanel Control in my project.I used it for Cross fade Effects.I have a Timer control in updatePapanel and on timer_Tick event i changed Image url.So image is changed on every Timer_Tick event.I want cross fade effects so i put image in Animatedupdate Panel.All things go well i check it in IE and FF.But when i close my browser i got an error like
Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type 'Array' cannot be converted to type 'Boolean'.
Parameter name: condition

I Don't understand what the reason behind it.
So pls help me.
thanks
Jignesh Prajapati
Web Developer
Grinfosys
India
Jignesh6990@yahoo.co.in

Saravana kumar

Posted on 5/26/2008 @ 7:04 AM
Hi Nikhil,
i have more than two update panels in my page.
Is that possible to maintain the history of all the updatepanels in a single updatehistory?
Could any one help on this

Thanks
Saravana kumar

Saravana kumar

Posted on 5/26/2008 @ 7:05 AM
Hi Nikhil,
i have more than two update panels in my page.
Is that possible to maintain the history of all the updatepanels in a single updatehistory?
Could any one help on this

Thanks
Saravana kumar

Darin

Posted on 6/9/2008 @ 2:56 PM
Has anyone come up with a solution for the problem of using actual page anchors along with the UpdateHistory functionality? As far as i can see, unless there is a way to navigate "past" or "through" the actual anchors while going back/forward in the browser's history, it can't be done cleanly.

Example:
i have a portal site with one main page, default.aspx, that drives many functions at once. I click around, creating browser history in the process. My next click is an anchor to farther down the page. I continue to navigate around the site but want to go back now. When i come to the anchor's position in the history, it tries to drive the page state off of the anchor value instead...

Mike

Posted on 6/23/2008 @ 12:01 AM
This won't compile in VS 2008/C# 3.0. ScriptManager, UpdatePanel, IScriptControl, etc. all can't be found. These are all in System.Web.UI, and there's a using statement for it, and there's a reference to the System.Web dll, but it still can't find these classes. Has anyone gotten this to work in C# 3.0?
Post your comment and continue the discussion.
 
 
 

 

 
Refresh this form if the spam-protection code is not readable, or has expired. (Your input will be preserved)