blog.mha.dk
The on-line blog of Michael Holm Andersen

PDC2008 session videos online!

Tuesday, 4 November 2008 07:02 by mha

All the session videos from Professional Developers Conference 2008 are now available online, so grap your favorite cup, brew a nice hot cappuccino and start watching...

Access ScriptManager on Content Page

Monday, 5 November 2007 10:44 by mha

Often you need to access the ScriptManager on a Content Page to e.g. set Focus to a Button. The easiest way to do this is using the static GetCurrent method of the ScriptManager Class. Like this:

ScriptManager.GetCurrent(Page).SetFocus(btnSubmitRequest);

Unless you're really sure a ScriptManager exists, you have to check if it exists like this:

// Does a ScriptManager exists for the page?
ScriptManager scMan = ScriptManager.GetCurrent(Page);
if (scMan == null) throw new Exception("No ScriptManager found!");

SetFocus on asynchronous postback

Saturday, 5 May 2007 18:58 by mha

Ever tried to have a TextBox control inside an UpdatePanel fire a TextChanged event? If you can answer Yes to this question, you probably know that the TextBox in question loses it's focus .. and if you've tried TextBox.Focus() you know this does not work inside an UpdatePanel.

The trick is to use the SetFocus(control) method of the ScriptManager on the page instead, e.g.: ScriptManager1.SetFocus(txtAntalLager);

Categories:   ASP.NET | AJAX
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Finally - ASP.NET AJAX v1.0 released

Wednesday, 24 January 2007 17:53 by mha

At last ASP.NET AJAX v1.0, formerly known as ATLAS, is shipping. This new Web development technology from Microsoft integrates cross-browser client script libraries with the ASP.NET 2.0 development framework - making it easier to develop Web Applications with a rich GUI, and improved user experience.

Complementing ASP.NET AJAX, the ASP.NET AJAX Control Toolkit offers developers a rich variety of client-side controls and extenders through a compilation of code samples and components.

I've been using ATLAS since the early CTP's, and are looking forward to integrate this technology into future Web Applications.

Update: www.aspnethotel.dk now supports ASP.NET AJAX on all web-servers - check out ajax.thinktwice.dk to see it in action!

Categories:   ASP.NET | AJAX | .NET hosting
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed