October 2008

You are browsing the site archives by month.

ASP.NET 4.0 – Some info from PDC

I am in my bed and watching a session from PDC called “ASP.NET 4.0 Roadmap”. So .. what is the good stuff?

One of the coolest thing is that Microsoft has totally been transformed into a realease early, realease often kind of company. It’s a huge diffrent between how it worked in the .net 1.0 – 2.0 days. And i guess we should thank Mr Guthrie for that.

So most of the things that they talk about that will come bundled in ASP.NET 4.0 is actually already available on codeplex for you to use today. Maybe not as finals but as betas and tech previews. I love the new Microsoft.


  • You will have control of the ID’s of webcontrols. That was about time.
  • Remove the need of using CSS Adapters to get “kind of” good control over the rendering. Also will controls render more appropiate code. Hopefully a menu will render a list and not some nested table crap and so on.
  • URL routing also for Webforms. Not only for MVC. Yippie ..
  • Viewstate on/off mode will be more like. Disable on the whole page but enable for this specific control. One more Yippieee.


  • As mentioned before. Native support for jQuery with intellisense. Actually you can download a javascript file from Google code (hehe) today to get complete intellisense.
  • Support for “Server side looking” client controls. Was not that impressed of thoose. But i have never been a big fan of Datasource controls and stuff like that. But it may be better that to just wrap a large grid control into a updatepanel. Well .. it must be better then that 😉


  • People who do not know what MVC is after all the buzz that has been around it the last 8-12 month will probably not care so much about it. Atleast not existing asp.net developers who has not head about it.
  • Basiclly it is amied against developers used to Rails, Django, PHP and developers who use those frameworks and languages. And ofcourse we webforms developers who just want to try everything and see how it works.

http://channel9.msdn.com/pdc2008/PC20/ (26 min)

Publicerat av den

Create a tag cloud with limited amout of tags in ASP.NET and LINQ

Today i built a Tag cloud for my new site. I found this great article about on how to do it with LINQ and C#. But i missed some features. Especially how to limit the number of tags that was shown. So if you read that article and then have a look at this code if you have the same problem as me.

The main difference between my code and the code in the article is that i have slightly more complex data model (should not matter) and that i make the second query against the “result” from the first query. This allow me to first order by popularity and then in alphabetic order.

Please leave a comment if there is any better way to do this or if you have any questions.

Publicerat av den

Using JQuery Validation plugin with ASP.NET

Like everyone else i’ve been playing around with JQuery a lot lately. Asp.net and JQuery is not the best friends in the world but i guess it will be a lot better when using ASP.NET MVC. Microsoft also announced that they will support JQuery natively in future versions. Nice!

If you want to learn more about ASP.NET and Jquery be sure to read both Rick Sthral’s and the Encosia blogs.

I’m working on a new project now where i am trying to stay away from asp.net ajax mainly because of performance reasons but also just because i want to learn something new. Today i’ve been using the JQuery Validation plugin.

There is alot of documentation of how to use it on the the documentation pages for the plugin but i want to share with you one thing that i had problems with.

This is some regular example code that all the sample’s use. The problem here is that for example “EmailTextbox” is not the ID of the control but the name.

I scratched my head for a long long time when i used ctl00_ContentPlaceHolder1_EmailTextbox and nothing worked at all. So what you have to do is change this to something like this ..

You could of course also use some method that rewrite the Control.UniqueID to a name and use <%= %> to get the name of the control.

Publicerat av den