Check all checkbox within GridView or DataGrid in Asp.Net

Check all checkbox within GridView or DataGrid in Asp.Net===================================================
Sometimes we need to handle functionality in our asp.net pages, like when a headercheckbox become selected, all checkbox within a GridView or DataGrid should become selected.So here, this is the way, by it you can handle this types of functionality.
Suppose your page GridView layout is like:—————————————————–
<asp:GridView ID=”gvCompanyInvoiceList” [...]

User Handler for Page Extension in Asp.Net

User Handler for Page Extension in Asp.Net====================================
In some cases you need to display you website pages (.aspx) to another extension like (.cgi)
In that case, you need to use inbuilt handler of Asp.net
You can do it by this way :
Setup your web.config file———————————-
Don’t forget to add section those are marked in “bold” in below code.
<?xml version=”1.0″?><!–Note: [...]

Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Normal string Encrypt and Decrypt

Encrypt and Decrypt string
========================
// Encrypt Method
private string EncryptString(string strSource)
{
Byte[] b = System.Text.ASCIIEncoding.ASCII.GetBytes(strSource);
string encryptedString = Convert.ToBase64String(b);
return encryptedString;
}
// Decrypt Method
private string DecryptString(string strSource)
{
Byte[] b = Convert.FromBase64String(strSource);
string decryptedString = System.Text.ASCIIEncoding.ASCII.GetString(b);
return decryptedString;
}
Abhishek Joshi

Send Mail with Asp.Net

1. Send Simple Mail in Asp.Net without any credentials (Host, Username or password)
========================================================================
using System.Net.Mail;
public static void SendMail(string From, string To, string Body, string Subject)
{
SmtpClient objSmtpClient = new SmtpClient();
// Given SMTP Server name here.
objSmtpClient.Host = ConfigurationManager.AppSettings["SmtpServer"].ToString();
objSmtpClient.Port = 25;
MailMessage objMailMessage = new MailMessage();
MailAddress objMailAddress = new MailAddress(From);
objMailMessage.From = objMailAddress;
objMailMessage.To.Add(To);
objMailMessage.Subject = Subject;
objMailMessage.IsBodyHtml = true;
objMailMessage.Body = Body;
objMailMessage.Priority = MailPriority.High;
objSmtpClient.Send(objMailMessage);
}
2. [...]