Welcome to Neudesic Blogs Sign in | Join | Help

Kill Dash 9, no more CPU time

I can't get this song out of my head, I'm partial to the passage "So I pull out my keyboard and I pull out my glock, And I dismount your girl and I mount /proc ". Enjoy...

Upcoming MSDN Webcast: An Introduction to ASP.NET 2.0 Web Parts

This Friday, March 9th at 1pm Pacific time, I'll be presenting an MSDN webcast on Web Parts in ASP.NET 2.0. In addition to a general introduction on what Web Parts are and how developers can effectively use them to build portals, I'm hoping to throw in a little ASP.NET AJAX stuff towards the end.

To register, go here. See ya then.

posted by David Barkol | 1 Comments
Filed Under:

New blog on ASP.NET Blogs

I have a new blog on ASP.NET Blogs. The address is: http://weblogs.asp.net/davidbarkol. Also, I put up a post today about the Ajax Server Extensions, check it out.

Future posts will most likely be on the new blog from now on.

 

Rounded corners for Web Parts in ASP.NET 2.0

Getting rounded corners on Web Parts in ASP.NET 2.0 isn't a trivial as you might think. It's the web part chrome that renders the border, title bar and other UI elements of all the web parts. To get rounded corners you have to extend both the WebPartZone and WebPartChrome classes to override a few methods and basically add padding to the corners.

While going down this path for a current project, we stumbled upon something that Fredrik Normen put together on GotDotNet called WebPart Components. The library adds rounded corners by doing pretty much the same thing - overriding the CreateWebPartChrome method in WebPartZone and overriding the RenderWebPart method in WebPartChrome. In addition, the library allows you to define templates for each chrome. This library turned out to be a huge time saver and now all that was left to do was to integrate it with ASP.NET AJAX.

In the WebPart Components library we added a  reference to the ASP.NET Futures/Preview dll and changed the TemplatedWebPartZone class to inherit from the WebPartZone class in the preview bits.

public class TemplatedWebPartZone : Microsoft.Web.Preview.UI.Controls.WebParts.WebPartZone

That's all we had to do. So, if you're looking to add rounded corners to Web Parts in ASP.NET 2.0, download and take a look at the WebPart Components library. The GotDotNet workspace is here.

posted by David Barkol | 2 Comments
Filed Under: ,

Drag and drop ASP.NET 2.0 Web Parts in Firefox and Safari with ASP.NET AJAX

The beta 2 release of the asp.net ajax library brings drag and drop support for ASP.NET 2.0 Web Parts in both Safari and Firefox. DND support has been around for Firefox since the Atlas March CTP. However, it was accidentally left out of the beta 1 release of asp.net ajax. Now it's back with additional support for Safari.

Assuming you've converted your app from Atlas to ASP.NET AJAX, you only need to do the following steps to get this working:

1) Add a reference to the ASP.NET 2.0 AJAX Futures CTP. If you've selected the 'ASP.NET AJAX CTP-Enabled Web Site' template then this reference is already done for you. This is the Microsoft.Web.Preview.dll that contains added features like the AutoCompleteExtender and ProfileService.

2) Include the tag prefix for the preview controls and add some tag mapping to replace the WebPartManager and WebPartZone controls with the ones from the preview bits. Add the following entries to the pages group in the web.config: 

<pages>
  <controls>
    ....
    <add tagPrefix="asp" namespace="Microsoft.Web.Preview.UI" assembly="Microsoft.Web.Preview"/>
    <add tagPrefix="asp" namespace="Microsoft.Web.Preview.UI.Controls" assembly="Microsoft.Web.Preview"/>
  </controls>
  <tagMapping>
    ...
    <add tagType="System.Web.UI.WebControls.WebParts.WebPartManager" mappedTagType="Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager"/>
    <add tagType="System.Web.UI.WebControls.WebParts.WebPartZone" mappedTagType="Microsoft.Web.Preview.UI.Controls.WebParts.WebPartZone"/>
  </tagMapping>
</pages>

3) Add the following to the httpHandlers collection in the web.config:

 

<add verb="GET" 
   path="ScriptResource.axd" 
   type="Microsoft.Web.Handlers.ScriptResourceHandler" 
   validate="false"/>
 

Below is a snapshot of it working in Safari. This particular application is something that we have been working on at Neudesic for a while. We've extended the Web Parts with rounded corners and added some additional AJAX goodies. In this snapshot you see a Del.icio.us tag cloud web part being dragged into another zone.

 

Safari drag and drop

And here is another action shot in Firefox of the an old web parts demo:

Firefox drag and drop

Lastly, I've updated the source of the demo portal app from an old code camp presentation, you can download it here:

posted by David Barkol | 38 Comments
Filed Under: ,

Desert Code Camp slides and source: ASP.NET AJAX (Atlas)

Last weekend I gave a presentation at Desert Code Camp on ASP.NET AJAX. I spent a lot of time on the server extensions (UpdatePanel, ScriptManager, etc.) and tried to cover as much as I could on the client-side stuff (Networking stack, JavaScript extensions, control toolkit ...). I also tried to cover some AJAX principles, guidelines an security. Unfortunately, you can only squeeze so much into an a little over an hour. Still, the basics got covered and overall it went pretty well. Below are links to the slides and source from the presentation. Included in the source is a sample rss reader which I didn't have a chance to demonstrate.

Source - http://www.neudesic.com/uploads/david_barkol/aspajax_demo.zip

Slides - http://www.neudesic.com/uploads/david_barkol/aspajax_slides.zip

posted by David Barkol | 2 Comments
Filed Under:

Upcoming ASP.NET AJAX Sessions

Just wanted to list a few upcoming talks I had on ASP.NET AJAX. I hope to cover not only the latest bits but also explain some of the changes from the previous CTP. Hope to see you there.

1) Desert Code Camp - Saturday, October 28th

2) Los Angeles .NET Developers Group - Monday, November 6th

ASP.NET AJAX ('Atlas') beta status

So it's been a while since the last Atlas CTP was released (July). By now, if you've been following Atlas; you should have seen Scott Guthrie's post about the naming and roadmap plans. If not, take a moment to read through the post and pay close attention to the "Atlas" Feature Delivery Plan.

What does this mean for existing applications built on the last CTP? It means that the next release - the beta release, is going to require you to make some changes to your code in regards to some of the syntax and references. This doesn't mean that features are going to be removed, just shifted around into two components:

  1. Core - fully supported features, part of 1.0 release
  2. CTP features - not fully supported, will work on top of supported 'core' release

We'll have a better idea of what makes it into the fully supported release soon. Until then, if you want to get a head start, here are a few recommended posts from Bertrand Le Roy:

posted by David Barkol | 3 Comments
Filed Under:

Visual Studio "Orcas" September CTP

The latest CTP for the next version of Visual Studio, codename "Orcas" has just been released. This time, it's been released as a VPC image, which is nice to see since I have so much CTP, beta, and alpha stuff on my machine right now.

Anyway, you can download it from here: http://www.microsoft.com/downloads/details.aspx?FamilyID=82243606-d16d-445c-8949-9ee8c10cda2e&DisplayLang=en

posted by David Barkol | (Comments Off)
Filed Under:

Source code format plug-in for Windows Live Writer

Mike Ormond has thrown together a nice source code format plug-in for Windows Live Writer that you can read about and download here. If you are using Community Server, you will just need to add the css from his site to the CSS Overrides settings of your blog.

Turn off AutoComplete when using Atlas AutoCompleteExtender

Background

The title of this post might seem a bit confusing, so first let's define a few things:

The Atlas AutoCompleteExtender is a server control that adds an auto-complete behavior to a text box. The results are displayed in a drop-down panel underneath the text box. Rather than just show a history of what was entered into the text box, the auto-complete results are returned from a web service call that you implement. The image below shows the results of what can potentially be a long list of items from my wife:

The browser AutoComplete is just a history of items that have been entered into a text box. As you start to enter text into the text box it will display the results from previous entries.

 

The Problem

If you use the AutoCompleteExtender and the browser settings for AutoComplete are enabled, you will get an overlay of both when entering text into the text box. In the image below you can see both the history and the auto-complete results from the web service displayed below the text box.

 

Solution

All we need to do is set the autocomplete attribute of the text box to 'off' :

<asp:TextBox ID="textBox1" runat="server" autocomplete="off" />

You can also turn off autocomplete for the entire form:

<form id="form1" method="post" runat="server" autocomplete="off">

You can do this programmatically as well:

textBox1.Attributes.Add("autocomplete", "off");

posted by David Barkol | 2 Comments
Filed Under:

Windows Live Writer

This post was composed with Windows Live Writer -- a cool, new desktop application that makes writing blog post easier. Aside from being a nice WYSIWIG editor for blog posts, it also supports publishing maps and photos (although I couldn't get it to work yet with Community Server).

Paul Stamatiou has a nice review here

A bloggers quest

Blogger's quest ends with keys to house

There is a great article on MSNBC about a blogger who bartered his way up from a red paper clip to a new home. This has inspired me to try this myself. I have this book on Web Parts that I'd like to trade (preferably for another book). The book is actually pretty good, I just can't get past the cover. While I don't mind the Wrox covers, this one is particulary disturbing. I brought it into the office one day and it literally scared one of my co-workers back into his cube. So... if you can get past the cover and have something interesting to offer, then this book is yours!

posted by David Barkol | 1 Comments

Atlas June CTP

The Atlas June CTP has finally been released. You can download it here.

The most visible changes are to the UpdatePanel, allowing you to add it dynamically to a page along with some other bug fixes.

One time at Code Camp, I took a semaphore and ...

San Diego Rock & Roll Code Camp

Code Camps are popping up all over the place (New Jersey, DC, Atlanta, Orlando ... ). The next installment of the Southern California Rock & Roll Code Camp is less than two weeks away. This is a free event, held June 24th & 25th at the UCSD Extension Complex in La Jolla, CA.

As usual, Neudesic will be there in full force with sessions on WCF, Agile, Team Foundation Server, C# 3.0, Atlas, SharePoint 2007 and more. I will be doing a session on Atlas with another member of our team. To join, register here. See ya there!

More Posts Next page »