Tuesday, December 15, 2009

JQuery and Master Pages

How to register jquery scripts with a master page? After much agonizing, I came upon this (which is learned from http://geekswithblogs.net/rachit/archive/2007/01/14/103608.aspx)...

HtmlGenericControl jqueryScriptTag = new HtmlGenericControl();
jqueryScriptTag.TagName = "script";
jqueryScriptTag.Attributes.Add("type", "text/javascript");
jqueryScriptTag.Attributes.Add("language", "javascript"); //don't need it usually but for cross browser.
jqueryScriptTag.Attributes.Add("src", "http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.js");
this.Page.Header.Controls.Add(jqueryScriptTag);

HtmlGenericControl jqueryDimensionsScriptTag = new HtmlGenericControl();
jqueryDimensionsScriptTag.TagName = "script";
jqueryDimensionsScriptTag.Attributes.Add("type", "text/javascript");
jqueryDimensionsScriptTag.Attributes.Add("language", "javascript"); //don't need it usually but for cross browser.
jqueryDimensionsScriptTag.Attributes.Add("src", ResolveUrl("~/Scripts/jquery.dimensions.js"));
this.Page.Header.Controls.Add(jqueryDimensionsScriptTag);

Tuesday, December 8, 2009

Announcing Primershee

Primershee is professional project management for the self-employed, independent contractors and other solo professionals seeking an efficient tool for estimating, tracking and invoicing... all in one.

Built from scratch by Bill, this tool reflects Bill's frustration with all the other tools out there. It's perfect for solo website developers and it might also work well for other solo professional scenarios.