Blog - Microsoft .NET, ASP.NET, AJAX and more

Getting ActiveTabChanging Functionality from the AJAX TabControl

by Dave Marini 1/4/2010 8:08:00 PM

I have always considered myself to be quite client-side challenged. Having been soured to the thought of JavaScript by all the browser specific code I used to have to write years ago I swore off it and took to server-side development and never looked back. After a year’s hiatus doing WPF programming, I’ve recently found myself back in the thick of web development with new patterns and technologies at the forefront, namely the MVC framework and the ubiquity of jQuery. Before I begin this post I’d like to say that jQuery is, well, everything that is good about client-side programming in my opinion.

So recently I found the need to roll my own dirty form warning mechanism on a site I was working on. These forms contain quite a lot of fields and so there is gratuitous use of the TabControl from the Microsoft AJAX Control Toolkit. One of the requirements was to alert the user to changes made on one of the tabs and offer the option to save the changes before allowing the user to change tabs. Initially I thought that this task would be a breeze, what with the OnClientActiveTabChanged handler on the TabContainer control and all. Then the sad reality dawned on me. There is no way to cancel the changing of tabs from the client side. Like a freight train full of explosives it barrels on, destroying my workflow and with it any chance I’ll get sleep. But all is not lost, because with a few JavaScript ninja moves, some nifty jQuery (optional) and no personal life there is a clean solution to this problem, So what’s the answer? Read on for the details. More...

Shout it kick it on DotNetKicks.com Bookmark and Share

My Wrox Blox Books - Now on Amazon!

by Damien White 1/30/2009 10:00:23 AM

I just happen to be browsing Amazon today and noticed that my Wrox Blox books are available for purchase on Amazon.com.  Pretty cool stuff!  They were listed up there before, but weren't available directly through Amazon until now.  For a full description and the table of contents of each, just click on the Amazon links at the bottom of this post.  In addition, here are my previous announcements:

Both books are good guides for anyone using ASP.NET AJAX in either Visual Studio 2005 or 2008 using .NET 2.0 (with the AJAX Extensions) or .NET 3.5.

Shout it kick it on DotNetKicks.com Bookmark and Share

Dynamic AJAX Control Toolkit - ValidatorCallout Extender

by Damien White 7/24/2008 8:51:38 AM
Technorati Tags: ,

I added one of these a while ago and figured I would include another.  Dynamic AJAX Toolkit Controls seem to really be an issue for some, so I hope this helps.  This time, we will create a dynamic ValidatorCallout for a TextBox with a RequiredFieldValidator (although you can use any validation method).  One other thing to note on the ValidatorCallout is that  it only works with client-side validation. More...

Shout it kick it on DotNetKicks.com Bookmark and Share

AJAX Control Toolkit - DropDownExtender Always Visible

by Damien White 6/12/2008 3:44:22 PM

imageToday I came across a problem of making the DropDownExtender appear as if it is a standard drop down like it is when you hover over it (as shown in the image to the right).  Initially I was thinking you could do something with the Animation framework, but after a bit of research I found the way to do it.  This forum post (look for the accept answer by KristoferA), has the solution.  The source code below the full working solution. More...

Shout it kick it on DotNetKicks.com Bookmark and Share

AJAX Control Toolkit - Layout Problems

by Damien White 6/11/2008 9:55:07 PM

A real common problem with using the AJAX Control Toolkit revolves around the rendering of the controls.  Taking an example from the ASP.NET Forums, let's say you have a Tab Control on your page.  Everything looks ok, and then you run it.  You notice that there is a weird space towards the bottom of one of your tabs.  D'oh!  What could be wrong?  Well, in general, usually the cause of these types of problems are related to one of two issues, Quirks Mode or CSS conflicts.  In the ASP.NET Forum example above, it was a Quirks Mode issue. More...

Shout it kick it on DotNetKicks.com Bookmark and Share
Tags:
Categories: AJAX | AJAX Control Toolkit | ASP.NET | CSS
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed