Monday, August 27, 2007

Adding Meta Tags to ASP.Net 2.0 Pages

Recently, I was looking for a way to add meta keywords and description into web pages programmatically. After implementing a method to do that I wanted to add different meta keywords and description to the same page but when loading different data. So I came across with this method which you can change meta keywords and description even with in the same page when loading different data.

HtmlMeta htmlMetaDesc = new HtmlMeta();
htmlMetaDesc.Name = "Description";
htmlMetaDesc.Content = "Nalaka Sanjeewa Aluthwala Hewage";
Page.Header.Controls.Add(htmlMetaDesc);

HtmlMeta htmlMeta = new HtmlMeta();
htmlMeta.Name = "Keywords";
htmlMeta.Content = "Nalaka, Sanjeewa, Aluthwala, Hewage";
Page.Header.Controls.Add(htmlMeta);

Friday, August 24, 2007

Ran Home

It's 107 days for my last post and it's about the new comer to my family, Sedani. I gave up spending time for blogging for the past 107 days as I gave up spending time for couple of things in my regular life style because I wanted to see my little girl is growing.

In weekdays, morning I only get couple of minutes to spend with her but sometimes she's in a sleep when I'm leaving. If I come home late she's in a sleep so I hardly get a chance to talk to her, spend sometime with her. So I didn't spend any time at office unnecessarily. As soon as I finished my work at office, I ran home to see my little baby girl.

Now she's 109 days old. Now she's responding to most of the things we are doing and saying. She smiles with me, she talks by saying aaahs, uuuhs and heeees. Now she knows me very well. And sometimes she's waiting to see me till I finish my work and coming home.