Hey little girl. I have a secret. Would you like to hear it?
Here are some more awesome movies for you to waste your time on: Albino Black Sheep
(Amanda, you’ll like this Napoleon Dynamite Soundboard)
August 29, 2006
by Dirk Watkins
4 Comments
Hey little girl. I have a secret. Would you like to hear it?
Here are some more awesome movies for you to waste your time on: Albino Black Sheep
(Amanda, you’ll like this Napoleon Dynamite Soundboard)
August 24, 2006
by Dirk Watkins
Comments Off
Sometimes the need arises to have the ability to change the meta tags within a child of a master page. I created a couple public properties that you can put in your code behind for your .net 2.0 master page to change the keywords and description meta tags on the fly. The methods below will set the tags and replace them if they already exist. Code is in C#.
Description Meta Tag
public string Description
{
set
{
if (Page.Header.FindControl(“dsc”) == null)
{
HtmlMeta hmDesc = new HtmlMeta();
hmDesc.Name = “description”;
hmDesc.ID = “dsc”;
hmDesc.Content = value;
Page.Header.Controls.Add(hmDesc);
}
else
{
((HtmlMeta)Page.Header.FindControl(“dsc”)).Content = value;
}
}get
{
HtmlMeta hmDesc = (HtmlMeta)Page.Header.FindControl(“dsc”);
return (hmDesc != null) ? hmDesc.Content : String.Empty;
}
}
Keywords Meta Tag
public string Keywords
{
set
{
if (Page.Header.FindControl(“kw”) == null)
{
HtmlMeta hm = new HtmlMeta();
hm.Name = “keywords”;
hm.ID = “kw”;
hm.Content = value;
Page.Header.Controls.Add(hm);
}
else
{
((HtmlMeta)Page.Header.FindControl(“kw”)).Content = value;
}}
get
{
HtmlMeta hm = (HtmlMeta)Page.Header.FindControl(“kw”);
return (hm != null) ? hm.Content : String.Empty;
}
}
Here are other ways that you can insert headers from the page level as well. The “ResolveUrl” methods below will get the relative path from the .net web application to whatever you pass it so a tilde will be translated into the root of your application. This function is really handy too.
Insert JavaScript Link
HtmlGenericControl js = new HtmlGenericControl();
js.TagName = “script”;
js.Attributes.Add(“language”, “javascript”);
js.Attributes.Add(“type”, “text/javascript”);
js.Attributes.Add(“src”, ResolveUrl(“~/js/global.js”));
/* ResolveUrl will get the relative path from the .net web application */
this.Page.Header.Controls.Add(js);
Cascading Style Sheet Link
HtmlLink ss = new HtmlLink();
ss.Attributes.Add(“type”, “text/css”);
ss.Attributes.Add(“rel”, “stylesheet”);
ss.Attributes.Add(“href”, ResolveUrl(“~/css/scr.css”));
this.Page.Header.Controls.Add(ss);
Robots/Other Meta Tags
HtmlMeta hm = new HtmlMeta();
hm.Name = “robots”;
hm.Content = “index,follow”;
this.Page.Header.Controls.Add(hm);//and re-use the HtmlMeta object again
hm = new HtmlMeta();
hm.Name = “date”;
hm.Content = DateTime.Now.ToString(“yyyy-MM-dd”);
hm.Scheme = “YYYY-MM-DD”;
this.Page.Header.Controls.Add(hm);
As you can see, the new meta functionality of .net 2.0 is a lot better than 1.1. Hopefully this will be of use in some of your web applications.
August 23, 2006
by Dirk Watkins
Comments Off
Internet Explorer 7 Beta 3′s CSS support has been locked down and will only be a stepping stone towards being actually CSS compliant. I really didn’t believe that they’d have a lot of fixes for their poor rendering of CSS but I was really hoping that they would. They have given allusions in the past that they are moving in the CSS standard direction but in this post detailing the CSS changes for IE7 they stated that they will try and make additional improvements to the CSS spec by creating new, proprietary specs prefixed with “ms”. This is so arrogant-big-brother-microsoft. They still have the mentality of “Hey, I’m the biggest. Everyone else should design for me. Screw the specs.”
Cross-browser CSS quirks probably cause my biggest headaches at work when I’m designing. You can get something to look cool in one browser then you try it in another and bang! No dice. So you fix it for that one and try it in the first and bang! You messed something up. Then you try it again and again – switching to 3 or 4 browsers until you get it relatively secure, albeit some fledgling issues, but overall working properly. Then another browser comes out…
Well, as I was thinking about CSS support for IE7 I came accross this wikipedia entry that details the different browser engines and their relative CSS support. Check it out. It’s kind of helpful…
Anyway, IE7 does render CSS a LOT better than IE6, even Eric Meyer’s complex spiral example that uses fixed background images in elements other than the body tag to create a really cool effect that would be perfect for my sweet myspace page. They also fixed the peekaboo, three-pixel text jog, and a whole list of other bugs although that’s really just a drop in the bucket on the way to CSS standardization. At least they are trying.
August 22, 2006
by Dirk Watkins
Comments Off
Check out “Color in Motion” – http://www.mariaclaudiacortes.com/ – a site that gives a really creative overview color usage. The Flash animation is really cool and gives some valuable insight into the psychology of color.
August 22, 2006
by Dirk Watkins
3 Comments
La Fiesta de Gringo is fast approaching. It’s this Saturday already! The festival will start around 2:30pm and will be going strong for at least 12 hours until 2:30am. Crabgrass, Sweetheart Tripwire and other crazy compilations of musicians and artisans will be rocking all night long. Matt has been preparing for a while and will have plenty of drinks, food and fire to go around. He even has a logo:

Now isn’t that a special logo? It’s so.. gringish.
We’ll be camping out and cooking s’mores too. I’m going to try and beat my 12-s’mores-in-one-night record.
Invite all your friends, friend’s moms and friend’s mom’s moms. It’s a simple equation: more people = more rock!
Oh, and here’s some required reading for you. There will be a quiz.