Silverlight 1.0 RC1 Released

July 28, 2007 at 4:35 pm (Silverlight)

Alright so RC of Silverlight 1.0 is officially out. There are some breaking changes, but nothing drastic IMO.

According to Tim Sneath there are about 2000 bugs fixes between the Mix version and RC1. Wow, impressive! They have also increased performance by 2-3 times for many cases, also a great improvement.

This version is suppose to be feature complete and very close to final. Given that this is late July, I guess we can expect a September release. Oh well I was hoping for it be officially released by now.

On the other hand Silverlight 1.1 Alpha Refresh is another story. Read about my disappointment here.

Permalink 1 Comment

Silverlight implemented by the Mono team in 21 days!

July 2, 2007 at 6:38 pm (Silverlight)

Miguel and many others on the Mono-Project implemented a basic functional version of Silverlight 1.1 in 21 days.

This is a phenomenal accomplishment and congratulations to the team!

More details here: http://tirania.org/blog/archive/2007/Jun-21.html

Permalink No Comments

Silverlight 1.1 Breaking Changes

June 29, 2007 at 11:44 am (Silverlight)

The BSL team has posted some breaking changes for Silverlight 1.1 that will be broken in the final release. Essentially they are removing all collections that are not generic.

Here is the link to more info:

http://blogs.msdn.com/bclteam/archive/2007/06/26/non-generic-collections-to-be-removed-from-silverlight-inbar-gazit.aspx

Permalink No Comments

Good article on SilverList drag and drop

June 28, 2007 at 9:41 pm (Silverlight)

Nick wrote up a pretty good article for drag and drop with SilverLight.

http://blogs.msdn.com/nickkramer/archive/2007/06/27/drag-drop-with-feedback.aspx

Permalink No Comments

Great utility to determine process for file/folder in use locks

May 18, 2007 at 9:46 pm (Utilities)

I recently had an issue that I couldn’t rename a folder because it was in use. I completely forgot that I had a SQL Server 2005 Express DB file in one of the subfolders.

Anyway, Unlocker is a great utility to help determine what is locking the file/folder and even kill the process if necessary.

Permalink No Comments

20 Essential Web Utilities

April 23, 2007 at 10:17 pm (Utilities)

DotNetGuts has a pretty good article listing 20 essential web utilties that should be used by web developers and web designers.

http://dotnetguts.blogspot.com/2007/03/20-essential-web-utilities.html

Permalink No Comments

SQL Snippet for Paging

April 18, 2007 at 11:49 am (SQL)

Microsoft SQL 2005 finally introduced better support for doing paging at the database level. I’m a little disappointed that MS is not pushing to use this as the default method for paging, instead of relying on ASP.NET controls.

1 USE AdventureWorks 2 GO 3 4 SELECT * FROM ( 5 SELECT 6 ROW_NUMBER() OVER (ORDER BY SellStartDate ASC) AS rownumber,* 7 FROM Production.Product 8 ) AS Product 9 WHERE rownumber between @FromRow AND @ToRow

Permalink No Comments

Using Windows Live Writer

April 18, 2007 at 1:56 am (blog)

After recently setting up my blog on WordPress, I decided to use Windows Live Writer to post to my blog. I am quite impressed at how easily and effortlessly it was to connect and post to the blog.

It’s not only the Live Writer itself but all the plugins that really make it easy to format (espcially code snippets) posts.

Permalink No Comments

URL Rewriting with ASP.NET and Handling Images and CSS

April 17, 2007 at 12:38 pm (ASP.NET)

As usually, ScottGu has an excellent post about URL rewriting with ASP.NET. No need for me to repeat what he already said :)

However at the end of his post, Scott has a section for dealing with CSS and Image references correctly, which has been causing problems for some including myself. The problem is with the use of the tilde (~) notation for ASP.NET controls and for the CSS you must use the absolute path meaning “/style.css” instead of just “styles.css”.

Handling CSS

Of course you can simply put an absolute path and your done. The solution I’m proposing here is an alternative and simulates the ~ notation. This solution was inspired by what Scott did with the forms control adapter.

Looking at typical page (including master pages) we have the following:

1 <head runat="server"> 2 <title>My Page</title> 3 <link href="Stylesheet.css" rel="stylesheet" type="text/css" /> 4 </head>

So that got me thinking that since the head is now a server it must also follow the ASP.NET rendering methods. So based on Scott’s sample you can add the following to the Form.browser file:

1 <browsers> 2 <browser refID="Default"> 3 <controlAdapters> 4 <adapter controlType="System.Web.UI.HtmlControls.HtmlForm" 5 adapterType="FormRewriterControlAdapter" /> 6 <adapter controlType="System.Web.UI.HtmlControls.HtmlLink" 7 adapterType="LinkRewriterControlAdapter" /> 8 </controlAdapters> 9 </browser> 10 </browsers>

Essentially we are going to override the rendering for the HtmlLink control. The C# code to do that (LinkRewriterControlAdapter) is:

1 public class LinkRewriterControlAdapter : System.Web.UI.Adapters.ControlAdapter 2 { 3 protected override void Render(HtmlTextWriter writer) 4 { 5 base.Render(new RewriteLinkHtmlTextWriter(writer)); 6 } 7 8 } 9 10 public class RewriteLinkHtmlTextWriter : HtmlTextWriter 11 { 12 #region Constructors 13 14 public RewriteLinkHtmlTextWriter(HtmlTextWriter writer) : base(writer) 15 { 16 this.InnerWriter = writer.InnerWriter; 17 } 18 19 public RewriteLinkHtmlTextWriter(System.IO.TextWriter writer) : base(writer) 20 { 21 this.InnerWriter = writer; 22 } 23 24 #endregion 25 26 public override void WriteAttribute(string name, string value, bool fEncode) 27 { 28 if (name == "href") 29 { 30 HttpContext Context = HttpContext.Current; 31 if (Context.Items["ActionAlreadyWritten"] == null) 32 { 33 string sStylesheetName = value; 34 int iSlashPos = value.LastIndexOf('/'); 35 if (iSlashPos >= 0) sStylesheetName = value.Substring(iSlashPos); 36 37 value = GetBaseURL() + "/" + sStylesheetName; 38 39 Context.Items["ActionAlreadyWritten"] = true; 40 } 41 } 42 base.WriteAttribute(name, value, fEncode); 43 } 44 }

This will override the rendering of the href attribute value for all <link> tags. The value coming in has already been resolved by ASP.NET, that is why there is some parsing for slash (/).

Handling Images

The tilde notation (~) works great if you are only doing one level of URL rewriting. If you want to do URL rewriting with mulitple levels ex: http://mysite.com/products/category/subcategory/subsubcategory/etc.., then (~) notation will no longer work since ASP.NET will resolve the URL relative to real ASPX page. For this case I find it simplest to use HTML elements and specify the href with inline code. Ex:

 

1 <a href="<% =GetBaseURL() %>/">Home</a>

Hope this helps. Please feel free to comment (go easy this is my first post :))

Permalink 8 Comments

Next entries »