Posts

Showing posts from October, 2013

SHA256 encryption with salt value in Asp.net

SHA256 encryption with salt value in Asp.net Import namespace using System.Security.Cryptography;   Logic     string sha;     string salt= "deol" ;     string ste_enc= "Kandyhere" ;     protected void Page_Load( object sender, EventArgs e)     {         sha = getc(ste_enc + salt);         Response.Write(sha);     }     public string getc( string qcc)     {         HashAlgorithm hashAlg = new SHA256CryptoServiceProvider ();               byte [] bytValue = System.Text. Encoding .UTF8.GetBytes(qcc);               byte [] bytHash = hashAlg.ComputeHash(bytValue);    ...

Hide column of Gridview and change its Header text on Condition

Image
Hide column of Gridview and change its Header text on Condition Step 1:-Design web from .aspx page    < div >             < asp : GridView ID ="gr" runat ="server" AutoGenerateColumns ="false" AlternatingRowStyle-BackColor ="WhiteSmoke" Width ="40%" OnRowDataBound ="gr_RowDataBound">                 < HeaderStyle BackColor ="#3366ff" Font-Bold ="true" ForeColor ="White" />                 < Columns >                     < asp : TemplateField HeaderText ="Name">                         < ItemTemplate > ...

Change Gridview ROW color according to Data Value.

Image
Change Gridview ROW color according to Data Value. Step 1: Design web form .aspx page < div >             < asp : GridView ID ="gr" runat ="server" AutoGenerateColumns ="false" AlternatingRowStyle-BackColor ="WhiteSmoke" Width ="40%" OnRowDataBound ="gr_RowDataBound">                 < HeaderStyle BackColor ="#3366ff" Font-Bold ="true" ForeColor ="White" />                 < Columns >                     < asp : TemplateField HeaderText ="Name">                         < ItemTemplate >      ...