out put:
Html code:

stem.Data.SqlClient;

public partial class Default2 : System.Web.UI.Page
{
SqlConnection scn = new SqlConnection("Data Source=.;Initial Catalog=test;Integrated Security=True;Pooling=False");
protected void Page_Load(object sender, EventArgs e)
{
GridView1.DataSource = GetData();
GridView1.DataBind();

}
ArrayList count = new ArrayList();
ArrayList rate = new ArrayList();
ArrayList date = new ArrayList();
int ln,a,b;
public DataSet GetData()
{
scn.Open();
SqlCommand cmd = new SqlCommand("select * from purchase",scn);
SqlDataReader sdr = cmd.ExecuteReader();
while (sdr.Read())
{
count.Add(sdr["count"].ToString());
rate.Add(sdr["rate"].ToString());
date.Add(sdr["date"].ToString());
}
sdr.Close();
scn.Close();
ln =Convert.ToInt32(count.Count.ToString());
DataSet ds = new DataSet();
DataTable dt = new DataTable("Purchase");
DataRow dr;
dt.Columns.Add(new DataColumn("Id", typeof(Int32)));
dt.Columns.Add(new DataColumn("Date", typeof(string)));
dt.Columns.Add(new DataColumn("Price", typeof(Int32)));
for (int i = 0; i <= ln-1; i++)
{
dr = dt.NewRow();
dr[0] = i;
dr[1] = date[i].ToString();
a =Convert.ToInt32(count[i].ToString());
b = Convert.ToInt32(rate[i].ToString());

dr[2] =a*b;
dt.Rows.Add(dr);
}
ds.Tables.Add(dt);
Session["dt"] = dt;
return ds;
}

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{

if (e.Row.RowType == DataControlRowType.DataRow)
{
DataBinder.Eval(e.Row.DataItem, "Price").ToString(); 
}


}
}





Databound Schedule controls for Project Management
These are two free controls, ScheduleCalendar and ScheduleGeneral, designed to show scheduled events in the form of a table. They are simple versions of the so-called Gantt chart. They don't have advanced features such as dependencies and milestones, but on the other hand, they use templated databinding, so it's up to you, the developer, what you want to show. 

The controls can be used for a broad variety of applications: time tables, resource usage planners, calendars, event schedulers, activities, reservations, sequences, project management, etc... See the demos for some examples. 







Firstly Install ansmptp.exe :

Source Code:

using AOSMTPLib;

AOSMTPLib.MailClass oSmtp = new AOSMTPLib.MailClass();


oSmtp.FromAddr = "chinnamallempati9@gmail.com";
oSmtp.AddRecipient("Support Team", "anveshmallempati9@gmail.com", 0);

oSmtp.Subject = "Test";
oSmtp.BodyText = "Hello, this is a test....";

if (oSmtp.SendMail() == 0)
{
Response.Write("Message delivered!");
}
else
{
Response.Write(oSmtp.GetLastErrDescription());
}

String militaryTimeFormat = "HH:mm";

String input = DateTime.Now.ToString(militaryTimeFormat);

DateTime time = DateTime.ParseExact(input, militaryTimeFormat, null);

string militaryTime = "06/07/2013 20:30";

IFormatProvider culture = new System.Globalization.CultureInfo("en-US", true);
DateTime militaryDate =DateTime.Parse(militaryTime, culture, System.Globalization.DateTimeStyles.NoCurrentDateDefault);


string g=DateTime.Now.ToString("dd/MM/yyyy HH:mm");
string h = DateTime.Now.ToString("HH:mm");