Wednesday, August 19, 2009

Convert String to System.Drawing.Color in ASPX C#

System.Drawing.Color c = System.Drawing.ColorTranslator.FromHtml("#F5F7F8");
String strHtmlColor = System.Drawing.ColorTranslator.ToHtml(c);

Sunday, April 12, 2009

JavaScript alert from UpdatePanel in ASPX (C#)

public void ClientMsg(string MsgTxt)
    {
        ScriptManager.RegisterClientScriptBlock(
        this.Page, 
        this.Page.GetType(), 
        "clientScript", 
        "alert('" + MsgTxt + "')", 
        true);
    }