My Linux Stuff - Complete Blog For Linux Articles

My Linux Stuff - Complete Blog For Linux Articles

A Website For Complete Linux OS,Step by Step linux Installtion, Linux Tips and Tricks and Linux Stuff and so on... Connect and sharing here....

TOP 50 ENGINEERING COLLEGES IN INDIA 2014

TOP 50 ENGINEERING COLLEGES IN INDIA 2014

This below survey was taken many form many colleges in India. These Top 50 Engineering Colleges in India have Good Infrastructure, Good Environment, Educations , Staff, Placement , Research Activities and other Facilities are good.

Top 10 Government Engineering Colleges in India

Top 10 Government Engineering Colleges in India

These Government Engineering Colleges in India are really good for all kind of stuff like Education , research , Placement and New Innovation Ideas etc... But Getting seat in these colleges are heavy competition in students .....

Top 10 Colleges In India 2014

Top 10 Colleges In India 2014

Indian Institute Of Technology Delhi,Indian Institute Of Technology Bombay,Indian Institute Of Technology Kanpur,Indian Institute Of Technology Madras,Indian Institute Of Technology Kharagpur,Indian Institute Of Technology Roorkee,University Of Delhi,Indian Institute Of Technology Guwahati,University Of Calcutta,University Of Mumbai, National Institute Of Technology,Trichy.

2014 LATEST SURVEY TOP RANKING ENGINEERING COLLEGES IN INDIA

2014 LATEST SURVEY TOP RANKING ENGINEERING COLLEGES IN INDIA

This below survey was taken many form many colleges in India. These Top 100 Engineering Colleges in India have Good Infrastructure, Good Environment, Educations , Staff, Placement , Research Activities and other Facilities are good. If you want to do Engineering as your dream and try out these colleges

Subscribe Now!

Enter your email address:

Monday, September 7, 2015

Send a Email Using Asp.net and C#

  protected void sendEmail()
        {
            using (MailMessage message = new MailMessage())
            {
                message.From = new MailAddress("from_address@gmail.com");
                message.To.Add(new MailAddress("to_address@test.med.sa"));
                //message.CC.Add(new MailAddress("copy@domain.com"));
                message.Subject = "Special Medication Request from " + txtPhyName.Text.ToString() + " , " + txtPosTile.Text; //Subject Here

                message.Body = "Drug Name : " + txtdrugName.Text.ToString() + "\n" + "Quantity: " + txtQtyReq.Text; //Body Of Email Content
                SmtpClient client = new SmtpClient();
                client.Host = "10.10.180.102";
                client.Send(message);
            }
        }




Add this Name Space in C#:

using System.Net.Mail;


Call this method in Button or any kind of Form to send Email....


Send a Email Using Asp.net and C#

Asp.net Repeater Export to Excel using c#

protected void btnExport_Click(object sender, EventArgs e)
      {
          {
              Response.ClearContent();
              Response.Buffer = true;
              Response.AddHeader("content-disposition", "attachment;filename=Excel-Filename.xls");
              Response.Charset = "";
              Response.ContentType = "application/excel";
              System.IO.StringWriter sw = new System.IO.StringWriter();
              HtmlTextWriter htm = new HtmlTextWriter(sw);
              rp_BindData.RenderControl(htm);
              Response.Write(sw.ToString());
              Response.End();
          }
      }

<asp:Button ID="btnExport" runat="server" Text="Export Excel" OnClick="btnExport_Click"/>

Asp.net Repeater Export to Excel using c#

Related Posts Plugin for WordPress, Blogger...