Dynamically add tags to ASP.NET page

I was creating a web-application for one of my clientele, where I was supposed to add Meta-Tags dynamically to ASP.NET page. This kind of worried me for some time. Then I thought, let me open up the Visual Studio 2005 IDE.

I was playing around in Object Browser with System.Web namespace when I found a new class…

HtmlMeta…! Hurray!

Let me try, was my first thought and the results were beautiful.

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
///
Summary description for CommonFunctions
/// </summary>

public static class CommonFunctions
{

public static void SetHeading(Page pg, string sHeading)
{
HtmlMeta meta = new HtmlMeta();
meta.Name =
“keywords”;
meta.Content =
“Company Name, products,” + “,” + sHeading ;
pg.Controls.Add(meta);
}
}

The site is now Search-Engine Optimized. The content can be changed dynamically!

Continue reading » · Rating: · Written on: 01-23-08 · No Comments »

The Stock Market: 22nd January, 2008

Rs 6 trillion loss on 21st January, 2008 – but its still not over!

I was playing Table Tennis, when my cell flashed up the news – Markets down by 10%. What??

What a day for the Indian Share Market! People, who have been playing safe as Bulls – are left astonished at the sudden fall of the Market for the consecutive day. The transition of a bull to a bear did not take much of time. The Credit Suisse Asset Manager, Bob Parker, (on BBC) finds the market to be in a danger zone and calls it as cheap. It all stems from the fall of economy in the United States. A decrease in the Interest rates from 4.25% to 3% by FED brought about panic in the Indian Market as well.

The Indian brokers (middle-agents) played safe by disallowing people to invest more money. This move was not triggered to stabilize the market. This involved their selfish interested driven by self-security. India joins the European bag in becoming a ‘bear’ market.

Its just few days when almost half of the investors in India bid for the Reliance Power IPO – a total amount of Rs 8 trillion in the bid. :) With looming markets, many people preferred to stop the cheques’ issued for the Reliance Power IPO. For those who preferred to be silent – great job! They probably will get more shares now!

For those who could buy some of the most preferred stocks or for those who lost a good invested money – it is a day everyone shall remember!

Continue reading » · Rating: · Written on: 01-22-08 · No Comments »