Wednesday, 18 February 2015

All ASP.Net Small Task.

1. Code for generate Mailto, subject, Body dynamically on click button
       <asp:Literal ID="lblemail" runat="server"></asp:Literal>

            SqlCommand sqlExhi = new SqlCommand("Select fname+' '+lname as name,email,username,password,nickname from tblexRegInfo,tblexhibitor where tblexhibitor.eventid='" + Session["eventid"] + "' and tblexhibitor.eventid=tblexRegInfo.eventid and tblexhibitor.exid='" + Session["exid"] + "' and tblexhibitor.exid=tblexRegInfo.exid ", Conn);
            Conn.Open();
            SqlDataReader dr = sqlExhi.ExecuteReader();
            if (dr.Read())
            {
                string textm = "?subject=" + Convert.ToString(dr["nickname"]) + " - Share with a Colleague&body=Dear colleague,%0D%0A%0D%0AWhile working on completing this year’s " + Convert.ToString(dr["nickname"]) + " online exhibitor manual, I found the following which is relevant for you to see, and benefit from.%0D%0A%0D%0A https://onlineexhibitormanual.com/IndexExhi15/ExhibitorLoginZone.aspx %0D%0A%0D%0AUsername and login details sent once again here enable you to access the manual, view information and packages, plus submit orders for both free and paid exhibitor benefits.%0D%0A%0D%0AUsername: " + Convert.ToString(dr["username"]) + "%0D%0A%0D%0APassword: " + Convert.ToString(dr["password"]) + "%0D%0A%0D%0ASincerely,%0D%0A%0D%0A" + Convert.ToString(dr["name"]);

                lblemail.Text = "<a href='mailto:"+Convert.ToString(dr["email"])+textm + "' class='btngoback' style='background-image:none; margin-right:24px;'>Share with a Colleague</a>";

            }
            Conn.Close();
            dr.Close();

2. Create data table dynamically in Asp.Net C#


public DataSet GetConferenceData_Day()
    {
        DataSet ds = new DataSet();
        DataTable dt = new DataTable();
        //string sql = @"select company_name, boothnumber as standid from tblexreginfo where confirm_status='Yes' order by company_name";
        string sql = @"select exid,company_name, boothnumber as standid from tblexreginfo where confirm_status='Yes' and eventid='event236' order by company_name";
        //a.id=c.id_day
        cmd.Connection = con;
        con.Open();
        cmd.CommandText = sql;
        adp = new SqlDataAdapter(cmd);
        adp.Fill(dt);
       
        DataTable dtNew = new DataTable();
        dtNew.Columns.Add("company_name", typeof(string));
        dtNew.Columns.Add("standid", typeof(string));
        dtNew.Columns.Add("prodId", typeof(string));
       
        if (dt != null && dt.Rows.Count > 0)
        {
            foreach (DataRow dr in dt.Rows)
            {
                string prodId = string.Empty;
                if (!string.IsNullOrEmpty(Convert.ToString(dr)))
                {
                    SqlDataAdapter da = new SqlDataAdapter("select ProdId from Exhibitor_prodCat where exid='" + dr["exid"] + "' and eventid='event236'", con);
                    DataTable dtProduct = new DataTable();
                    da.Fill(dtProduct);
                    if (dtProduct != null && dtProduct.Rows.Count > 0)
                    {
                        int prodid = 0;
                        foreach (DataRow drProduct in dtProduct.Rows)
                        {
                            if (!string.IsNullOrEmpty(Convert.ToString(drProduct["ProdId"])))
                            {
                                prodid = Convert.ToInt32(drProduct["ProdId"]);                               
                                prodId = prodId + "," + prodid;
                            }
                        }                      
                    }                   
                }
                if (!string.IsNullOrEmpty(prodId))
                {
                    prodId = prodId.Substring(1);
                }
                else
                {
                    prodId = "NULL";
                }
                dtNew.Rows.Add(Convert.ToString(dr["company_name"]), Convert.ToString(dr["standid"]), prodId);
            }
        }
        con.Close();
        ds.Tables.Add(dtNew);
        return ds;

    }

3. Send schedule mail by date in Asp.Net C#


void Application_Start(object sender, EventArgs e)
    {
        Application["OnlineUsers"] = 0;

        // Code that runs on application startup
        System.Timers.Timer myTimer = new System.Timers.Timer();
        // Set the Interval to 5 seconds (5000 milliseconds).
        myTimer.Interval = 5000;
        myTimer.AutoReset = true;
        myTimer.Elapsed += new System.Timers.ElapsedEventHandler(myTimer_Elapsed);
        myTimer.Enabled = true;

    }
    public void myTimer_Elapsed(object source, System.Timers.ElapsedEventArgs e)
    {
        // use your mailer code
        SendScheduleMail objScheduleMail = new SendScheduleMail();
        objScheduleMail.SendAutoMail();
    }
public void SendAutoMail()
    {
        SqlDataAdapter daEmailTemplate = new SqlDataAdapter("select fromemail,subject,message,ccEmail,bccEmail from tbl_emailReminder_template where eventid='event216' and pagename='ReminderAllExhibitors' ", Conn);
        DataTable dsEmailTemplate = new DataTable();
        daEmailTemplate.Fill(dsEmailTemplate);
        if (dsEmailTemplate.Rows.Count > 0)
        {
            if (Convert.ToString(dsEmailTemplate.Rows[0]["fromemail"]) != "")
            {

                SqlDataAdapter daExhiList = new SqlDataAdapter("select fName,lName,email,ReminderDate,exid from tblexreginfo where eventid='event216' and ReminderTemplate='ReminderAllExhibitors' and ReminderStatus='0' ", Conn);
                DataTable dsExhiList = new DataTable();
                daExhiList.Fill(dsExhiList);

                if (dsEmailTemplate.Rows.Count > 0)
                {

                    for (int i = 0; i < dsEmailTemplate.Rows.Count; i++)
                    {
                        string ReminderDate = string.Empty;
                        ReminderDate = Convert.ToString(dsExhiList.Rows[i]["ReminderDate"]);
                        if (!string.IsNullOrEmpty(ReminderDate))
                        {
                            TimeSpan sendmail = Convert.ToDateTime(ReminderDate).Subtract(DateTime.Now);
                            if (sendmail.Days == 0)
                            {
                                SendMail(Convert.ToString(dsExhiList.Rows[i]["email"]), Convert.ToString(dsEmailTemplate.Rows[0]["fromemail"]), Convert.ToString(dsEmailTemplate.Rows[0]["ccEmail"]), Convert.ToString(dsEmailTemplate.Rows[0]["bccEmail"]), Convert.ToString(dsExhiList.Rows[i]["fName"]), Convert.ToString(dsExhiList.Rows[i]["lName"]), Convert.ToString(dsEmailTemplate.Rows[0]["subject"]), Convert.ToString(dsEmailTemplate.Rows[0]["message"]));

                                string _query = "update tblexreginfo set ReminderStatus='1' where eventid='event216' and exid='" + Convert.ToString(dsExhiList.Rows[i]["exid"]) + "'";
                                using (SqlCommand comm = new SqlCommand(_query, Conn))
                                {
                                    if (Conn.State != ConnectionState.Open)
                                        Conn.Open();
                                    comm.ExecuteNonQuery();
                                    if (Conn.State != ConnectionState.Closed)
                                        Conn.Close();
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    // fuction for the Email sending
    private void SendMail(string sTo, string sFrom, string sCC, string sBCC, string FirstName, string LastName, string Subject, string Msg)
    {
        string strRegex = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +
       @"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +
       @".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";
        Regex re = new Regex(strRegex);
        if (re.IsMatch(sTo))
        {
            string sSubject = string.Empty, sBody = string.Empty;
            MailMessage oMail = new MailMessage();
            oMail.To.Add(sTo);

            if (!String.IsNullOrEmpty(sBCC))
                oMail.Bcc.Add(sBCC);
            if (!String.IsNullOrEmpty(sCC))
                oMail.CC.Add(sCC);

            MailAddress oAddress = new MailAddress(sFrom);
            oMail.IsBodyHtml = true;
            oMail.From = oAddress;
            oMail.Priority = MailPriority.Normal;
            oMail.Subject = Subject;
            sBody = "<html><body>"
                     + "<table width='100%' cellpadding='8' style='font-family:Verdana, Helvetica, sans-serif; font-size:12px;' cellspacing='0' border='0'>"
                            + "<tr><td colspan='2'>Dear  " + FirstName + " " + LastName + ",</td></tr>"
                            + "<tr><td colspan='2'>" + Msg + " </td></tr>"
                     + "</table>"
                     + "</body></html>";
            oMail.Body = sBody;
            SmtpClient oSmtp = new SmtpClient();
            oSmtp.Send(oMail);
        }
    }

4. Use of Server Variable for tracking in Asp.Net C#


 string clintip = Request.ServerVariables["REMOTE_ADDR"];
        string sPageName = string.Empty;
        string sPageActual = string.Empty;

        sPageName = Request.ServerVariables["URL"].ToString();
        if (sPageName == null || sPageName == "")
        {
            string[] sPage = sPageName.Split('/');
            sPageActual = sPage[3].ToString();
        }

        else
        {
            sPageActual = "-";
        }

        string sRefer = string.Empty, sRefActual = string.Empty;

        sRefer = Request.ServerVariables["HTTP_REFERER"];
        if (sRefer == null || sRefer == "")
        {
            sRefActual = "-";
        }
        else
        {
            string[] sRef = sRefer.Split('/');
            sRefActual = sRef[4].ToString();
        }

string Trackqry = "Insert into tblExLoginTrack_BackOffice(eventid,ClientIP,HTTP_Referer,pageviewed,DateAndTime) values('" + Session["eventid"].ToString() + "','" + clintip + "','" + sRefActual + "','" + sPageActual + "',getdate())";
        SqlCommand TracksqlQuery = new SqlCommand(Trackqry, Conn);
        Conn.Open();
        TracksqlQuery.ExecuteNonQuery();

        Conn.Close();

5. Use of Asp.Net Tree View Control


<table  width="100%" cellpadding="0" cellspacing="0" border="0">
                                         <tr>
                                             <td valign="top" align="left">                                           
                                                <asp:treeview ID="TreeView1" NodeWrap="true" CssClass="text" Font-Size="10px" runat="server"></asp:treeview>
                                             </td>
                                         </tr>
                                     </table>


#region Manage page content new
    void fill_Tree()
    {

        //string[,] ParentNode = new string[100, 2];
        //int count = 0;
         Conn.Open();
        string sLinkText = string.Empty, sLinkParent = string.Empty, sLinkId = string.Empty, sLinkHref = string.Empty;

        SqlCommand pCmd = new SqlCommand("select * from tbldnlinks where eventid='" + Session["eventid"].ToString() + "' and link_chkstat='1' and link_status='0' and (link_id not like 'f%' and link_id not like 'e%') order by len(link_odr), link_odr", Conn);
        SqlDataReader Sdr = pCmd.ExecuteReader();
        if (Sdr.HasRows)
        {
            while (Sdr.Read())
            {
                // ParentNode[count, 0] = Sdr.GetValue(Sdr.GetOrdinal("link_href")).ToString();
                //ParentNode[count++, 1] = Sdr.GetValue(Sdr.GetOrdinal("link_txt")).ToString();
                sLinkText = Sdr["link_txt"].ToString();
                sLinkParent = Sdr["link_parent"].ToString();
                sLinkId = Sdr["link_id"].ToString();
                sLinkHref = Sdr["link_href"].ToString();

                TreeNode root = new TreeNode();
                root.Text = "<li>" + sLinkText + "</li>";
                root.Target = "_blank";
                root.NavigateUrl = "../Content.aspx?refer=" + sLinkHref;
                //TreeView1.Nodes.Add(root);
                //Code for sub menu
                SqlCommand pCmd1 = new SqlCommand("select * from tbldnlinks where eventid='" + Session["eventid"].ToString() + "' and link_chkstat='1' and link_status='1' and link_parent='" + sLinkId + "' and (link_id not like 'f%' and link_id not like 'e%') order by len(link_odr), link_odr", Conn);
                SqlDataReader Sdr1 = pCmd1.ExecuteReader();
                if (Sdr1.HasRows)
                {
                    while (Sdr1.Read())
                    {
                        sLinkText = Sdr1["link_txt"].ToString();
                        sLinkParent = Sdr1["link_parent"].ToString();
                        sLinkId = Sdr1["link_id"].ToString();
                        sLinkHref = Sdr1["link_href"].ToString();

                        TreeNode child = new TreeNode();
                        child.Text = "<li>" + sLinkText + "</li>";
                        child.Target = "_blank";
                        child.NavigateUrl = "../Content.aspx?refer=" + sLinkHref;
                        root.ChildNodes.Add(child);

                        //Code for sub sub menu

                        SqlCommand pCmd2 = new SqlCommand("select * from tbldnlinks where eventid='" + Session["eventid"].ToString() + "' and link_chkstat='1' and link_status='2' and link_parent='" + sLinkId + "' and (link_id not like 'f%' and link_id not like 'e%') order by len(link_odr), link_odr", Conn);
                        SqlDataReader Sdr2 = pCmd2.ExecuteReader();
                        if (Sdr2.HasRows)
                        {
                            while (Sdr2.Read())
                            {
                                sLinkText = Sdr2["link_txt"].ToString();
                                sLinkParent = Sdr2["link_parent"].ToString();
                                sLinkId = Sdr2["link_id"].ToString();
                                sLinkHref = Sdr2["link_href"].ToString();

                                TreeNode child2 = new TreeNode();
                                child2.Text = "<li> " + sLinkText + "</li>";
                                child2.Target = "_blank";
                                child2.NavigateUrl = "../Content.aspx?refer=" + sLinkHref;
                                root.ChildNodes.Add(child2);
                            }
                        }

                    }
                }
                TreeView1.Nodes.Add(root);
            }
            TreeView1.CollapseAll();
          
        }
        Conn.Close();
       
    }

    #endregion

6. Import Data Form Excel to data base in Asp.Net C# with traction.

// Create a page and paste below code in .aspx page.

<%@ Page Language="C#" MasterPageFile="~/admin/InnerMasterPage.master" AutoEventWireup="true"
    CodeFile="ImportExcelsheet.aspx.cs" Inherits="Admin_ImportExcelsheet"
    Title="Untitled Page" %>

<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="AdminContentPlaceHolder" runat="Server">
    <table cellpadding="2" cellspacing="0" width="100%" border="0" align="center" class="tab-border">
        <tr>
            <td>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td bgcolor="#cccccc" height="1" colspan="2">
                        </td>
                    </tr>
                    <tr>
                        <td class="titletext">
                            IMPORT EXHIBITORS
                        </td>
                        <td align="right">
                            <%-- <a href="website/Default.aspx?refer=1" target="_blank">
                                <img src="images/preview_website.gif" border="0" /></a>--%>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="#cccccc" height="1" colspan="2">
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
        <asp:Panel ID="Panel2" runat="server" Height="100%" Width="100%">
            <tr>
                <td>
                    <table width="100%" border="0" cellspacing="8" cellpadding="4">
                        <tr>
                            <td colspan="2">
                                Please <a href="ExhiBook1.xls"><strong>click here</strong></a> for downloading the
                                sample Excel Sheet
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                Select the Excel Sheet<font color="red">*</font> :
                                <asp:FileUpload ID="fileUpload" runat="server" /><br />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="fileUpload"
                                    Display="Dynamic" ErrorMessage="You must select a file."></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="fileUpload"
                                    Display="Dynamic" ErrorMessage="Only Excel files(xls) files are permitted." ValidationExpression=".*\.(xls|xlsx)"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="lblWarning" runat="server" ForeColor="Red" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="Label1" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <b>HELP FOR UPLOADING EXCEL SHEET</b><br />
                                <ol type="1">
                                    <li>Click on &lt;Browse...&gt; button above</li>
                                    <li>Select the file and click &lt;Open&gt; button</li>
                                    <li>Then click &lt;Proceed&gt; button.</li>
                                    <li>Please note that from the excel sheet add only new exhibitor (those who are not
                                        in the exhibitor list on the manual)</li></ol>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" align="center">
                                <asp:Button ID="btnUpload" runat="server" OnClick="btnUpload_Click" Text="Proceed" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </asp:Panel>
        <asp:Panel ID="Panel1" runat="server" Width="100%" Height="100%">
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <strong>Exhibitors from the selected Excel sheet have been successfully added to the
                        database.</strong>
                </td>
            </tr>
        </asp:Panel>
    </table>
    <br />
    <br />

</asp:Content>

// Paste below code in .cs page

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Data.SqlClient;

public partial class Admin_ImportExcelsheet : System.Web.UI.Page
{
    SqlConnection Conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
    SqlConnection Conn1 = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
   // SqlConnection Connwebsite = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionStringwebsite"].ConnectionString);
    protected void Page_Load(object sender, EventArgs e)
    {
        Security vvv = new Security();
        vvv.abc();

        Panel1.Visible = false;
        Panel2.Visible = true;
    }

    protected void btnUpload_Click(object sender, EventArgs e)
    {
        if (fileUpload.HasFile)
        {
            //Declare a string to hold  file extension
            string fileExt = System.IO.Path.GetExtension(fileUpload.FileName);

            //Check file file extension
            if (fileExt == ".xls")
            {
                //try
                //{
                //if file is indeed excel, save the file
                fileUpload.SaveAs(Server.MapPath("UploadExcel/" + fileUpload.FileName));
                //Write Some information to display on label
                Label1.Visible = true;
                Label1.ForeColor = System.Drawing.Color.Blue;
                Label1.Text = "File name: " +
                fileUpload.PostedFile.FileName + "<br>" + "File Size: " +
                fileUpload.PostedFile.ContentLength + " kb<br>" +
                "Content type: " +
                fileUpload.PostedFile.ContentType;

                string sSavePath = "UploadExcel/";
                //Read Contents Here
                //declare a string to hold connectionstring
                string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + Server.MapPath(sSavePath + fileUpload.FileName) + ";" + "Extended Properties=Excel 8.0;";
                //Create an oledb connection 
                OleDbConnection oledbConn = new OleDbConnection(connectionString);

                //try
                //{
                // Open connection
                oledbConn.Open();


                // Create OleDbCommand object and select data from worksheet Sheet1
                OleDbCommand cmd = new OleDbCommand("SELECT * FROM [Sheet1$]", oledbConn);

                // Create new OleDbDataAdapter 
                OleDbDataAdapter oleda = new OleDbDataAdapter();

                oleda.SelectCommand = cmd;

                // Create a DataSet which will hold the data extracted from the worksheet.
                DataSet ds = new DataSet();

                // Fill the DataSet from the data extracted from the worksheet.
                oleda.Fill(ds, "Exhibitors");
                foreach (DataRow r in ds.Tables["Exhibitors"].Rows)
                {
                    // Check Whether Company name exists
                    if (Convert.ToString(r["Account Long Name"]) == String.Empty)
                    {
                        lblWarning.Visible = true;
                        lblWarning.Text = "Some exhibitors whose Company name is missing will not be added";
                        lblWarning.Text += "<br> This field are mandatory. You must fill this field for all exhibitors";
                        lblWarning.Text += "<br> and redo the process again";

                    }
                    else
                    {
                        // Get Next Exhibitor ID
                        string sExId = string.Empty;
                        SqlDataAdapter oAdapter = new SqlDataAdapter("select max(cast(substring(exId,8,4) as smallint)) as maxId from tblExRegInfo where eventid='" + Session["EventId"] + "'", Conn);
                        DataTable oData = new DataTable();
                        oAdapter.Fill(oData);
                        if (string.IsNullOrEmpty(Convert.ToString(oData.Rows[0]["maxId"])))
                            sExId = "exhiReg1";
                        else
                        {
                            int iExId = Convert.ToInt32(Convert.ToString(oData.Rows[0]["maxId"]));
                            iExId += 1;
                            sExId = "exhiReg" + Convert.ToString(iExId);
                        }



                        SqlTransaction tn;
                        Conn.Open();
                        tn = Conn.BeginTransaction();
                        
                        // check whether unique id exist or not
                        SqlCommand cmds = new SqlCommand("select DmgUniqueId,exid from tblexreginfo where eventid='event216' and DmgUniqueId='" + Convert.ToString(r["Stand Opp ID"]).Trim() + "'", Conn1);
                        Conn1.Open();
                        SqlDataReader drs = cmds.ExecuteReader();
                        if (drs.Read())
                        {
                            // Code for update tbl_insert_standdetails table
                              //SqlCommand oCommand1s = new SqlCommand("update tbl_insert_standdetails set SpaceCell='" + Convert.ToString(r["Type of Stand"]).Replace("'", "''") + "' where eventid='" + Session["EventId"] + "' and exhibitorid='" + drs["exid"] + "'", Conn, tn);
                             // oCommand1s.ExecuteNonQuery();

                            ////Code for update exhibitor data table
                           // SqlCommand oCommand1s2 = new SqlCommand("update tblexreginfo set BannerName='" + Convert.ToString(r["Banner Name"]).Replace("'", "''") + "' where eventid='" + Session["EventId"] + "' and exid='" + drs["exid"] + "'", Conn, tn);
                           // oCommand1s2.ExecuteNonQuery();
                        }
                        else
                        {

                            //Code for insert data into tblexreginfo table
                            SqlCommand oCommand = new SqlCommand("insert into tblexreginfo(eventid,exid,prefix,fname,lName,title,nickname,company_name,address,aptname,city,state,country,zip,telephone,fax,email,boothnumber,field2,field3,confirm_status,entry_date,DmgUniqueId,BannerName,mainProdCat,ExhibitorType) values('" + Session["EventId"] + "','" + sExId + "','" + Convert.ToString(r["Salutation"]).Replace("'", "''") + "', '" + Convert.ToString(r["First Name"]).Replace("'", "''") + "','" + Convert.ToString(r["Last Name"]).Replace("'", "''") + "','" + Convert.ToString(r["Job Title"]).Replace("'", "''") + "','" + Convert.ToString(r["Sub Allocation Name"]).Replace("'", "''") + "','" + Convert.ToString(r["Account Long Name"]).Replace("'", "''") + "','" + Convert.ToString(r["Billing PO BOX"]).Replace("'", "''") + "','" + Convert.ToString(r["Billing Street"]).Replace("'", "''") + "','" + Convert.ToString(r["Billing City"]).Replace("'", "''") + "','" + Convert.ToString(r["Billing State/Province"]).Replace("'", "''") + "','" + Convert.ToString(r["Billing Country"]).Replace("'", "''") + "','" + Convert.ToString(r["Billing Zip/Postal Code"]).Replace("'", "''") + "','" + Convert.ToString(r["Phone 1"]).Replace("'", "''") + "','" + Convert.ToString(r["Fax 1"]).Replace("'", "''") + "','" + Convert.ToString(r["Email 1"]).Replace("'", "''") + "','" + Convert.ToString(r["Stand Number(s)"]).Replace("'", "''") + "','" + Convert.ToString(r["Mobile 1"]).Replace("'", "''") + "','" + Convert.ToString(r["Website"]).Replace("'", "''") + "','Yes',getdate(),'" + Convert.ToString(r["Stand Opp ID"]).Replace("'", "''") + "','" + Convert.ToString(r["Banner Name"]).Replace("'", "''") + "','" + Convert.ToString(r["Main Product Category"]).Replace("'", "''") + "','" + Convert.ToString(r["Type of Exhibitor"]).Replace("'", "''") + "')", Conn, tn);
                            oCommand.ExecuteNonQuery();

                            //Code for insert data into tbl_insert_standdetails table
                            SqlCommand oCommand1 = new SqlCommand("insert into tbl_insert_standdetails(eventid,ExhibitorId,CompanyName,ExhibitorName,SpaceCell,Hall,StandNo,Width,Length,fld4,DateOfCreatd,LastUpdatedDate) values('" + Session["EventId"] + "','" + sExId + "','" + Convert.ToString(r["Account Long Name"]).Replace("'", "''") + "','" + Convert.ToString(r["Account Long Name"]).Replace("'", "''") + "','" + Convert.ToString(r["Type of Stand"]).Replace("'", "''") + "','" + Convert.ToString(r["Hall(s)"]).Replace("'", "''") + "','" + Convert.ToString(r["Stand Number(s)"]).Replace("'", "''") + "','" + Convert.ToString(r["Stand Width"]).Replace("'", "''") + "','" + Convert.ToString(r["Stand Depth"]).Replace("'", "''") + "','" + Convert.ToString(r["Contractual Sq M"]).Replace("'", "''") + "',getdate(),getdate())", Conn, tn);
                            oCommand1.ExecuteNonQuery();


                            
                        }
                        tn.Commit();
                        tn.Dispose();
                        Conn.Close();
                        Conn1.Close();
                        

                        Panel1.Visible = true;
                        Panel2.Visible = false;
                    }
                }
                oledbConn.Close();
            }
            //catch any exception for excel sheet connection and reading
            //catch (Exception m)
            //{
            //    Response.Write(m.Message);
            //}
            //You must close the connection   
            //finally
            //{
            // Close connection


            // }

            //End Reading Contents Here
            // }
            // Catch any exception related to file Upload
            //catch (Exception ex)
            //{
            //    Label1.Text = "ERROR: " + ex.Message);
            //}
        }
        //Print if file extension matching failed
        else
        {
            Label1.Text = "Only .xls files allowed!";
        }
        //}
        // Print if user has not selected any file
        //else
        //{
        //    Label1.Text = "You have not specified a file.";
        //}

    }
}

7. Send Mail in Asp.Net C# with check email address is right or wrong in standard format.

    // fuction for the Email sending
    private void SendMail(string sTo, string sFrom, string sCC, string sBCC, string FirstName, string LastName, string Subject, string Msg)
    {
        string strRegex = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +
       @"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +
       @".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";
        Regex re = new Regex(strRegex);
        if (re.IsMatch(sTo))
        {
            string sSubject = string.Empty, sBody = string.Empty;
            MailMessage oMail = new MailMessage();
            oMail.To.Add(sTo);

            if (!String.IsNullOrEmpty(sBCC))
                oMail.Bcc.Add(sBCC);

            if (!String.IsNullOrEmpty(sCC))
                oMail.CC.Add(sCC);

            MailAddress oAddress = new MailAddress(sFrom);
            oMail.IsBodyHtml = true;
            oMail.From = oAddress;
            oMail.Priority = MailPriority.Normal;
            oMail.Subject = Subject;
            sBody = "<html><body>"
                     + "<table width='100%' cellpadding='8' style='font-family:Verdana, Helvetica, sans-serif; font-size:12px;' cellspacing='0' border='0'>"
                            + "<tr><td colspan='2'>Dear  " + FirstName + " " + LastName + ",</td></tr>"
                            + "<tr><td colspan='2'>" + Msg + " </td></tr>"
                     + "</table>"
                     + "</body></html>";
            oMail.Body = sBody;
            SmtpClient oSmtp = new SmtpClient();
            oSmtp.Send(oMail);
        }
        lblMessage.Text = "Mail Sent Successfully";

    }

//in web config setting

<system.net>
<mailSettings>
<!--<smtp deliveryMethod="Network">-->
<smtp>
<!--<network host="smtp.emailsrvr.com" userName="amod@gmail.com" password="adythebest" defaultCredentials="false" port="25"/>
        <network host="89.234.4.213"/>
<network host="localhost" port="25"/>-->
<network host="524754-WEB2" userName="websupport@themescreations.com" password="Gaurav123" defaultCredentials="false" port="25"/>
</smtp>
</mailSettings>
</system.net>

// Another Standard format

    //Code for Send Mail who have fill the Complete form
    private void SaveSendMail()
    {
        //Mail code exhibitor
        string sBody = string.Empty;
        MailMessage oMail = new MailMessage();
        oMail.To.Add(txtEmail.Text.TrimEnd());
        MailAddress oAddress = new MailAddress(adminemail.TrimEnd());
        oMail.IsBodyHtml = true;
        oMail.From = oAddress;
        oMail.Priority = MailPriority.Normal;
        oMail.Subject = "The Hotel Show Saudi Arabia 2015  – " + txtCompany_name.Text + " – " + StandNo + " - FORM " + formno + " - " + Taskname.ToUpper() + " FORM - submitted";
        sBody = "<html><body><table width='100%' cellpadding='8' style='font-family:Arial, Helvetica, sans-serif; font-size:12px;' cellspacing='0' border='0'>"
            + "<tr><td colspan='2'>Dear  " + txtContact.Text + "</td></tr>"
            + "<tr><td colspan='2'>" + txtCompany_name.Text + " You have submitted <b> FORM " + formno + " - " + Taskname + " form </b>. <br><br>The details you have filled in are as below :</td></tr>"
           + FormCodeMail()
            + "<tr><td colspan='2'><br><br>The Hotel Show Saudi Arabia 2015<br>Online Manual Team</td></tr>"
            + "</table></body></html>";

        oMail.Body = sBody;
        SmtpClient oSmtp = new SmtpClient();
        //oSmtp.Host = "localhost";
        //oSmtp.Host = "89.234.4.213";
        //oSmtp.Port = 25;
        oSmtp.Send(oMail);

        //Mail code for organiser
        string sBody1 = string.Empty;
        MailMessage oMail1 = new MailMessage();
        oMail1.To.Add(adminemail.TrimEnd());
        MailAddress oAddress1 = new MailAddress(txtEmail.Text.TrimEnd());
        oMail1.IsBodyHtml = true;
        oMail1.From = oAddress1;
        oMail1.Priority = MailPriority.Normal;
        oMail1.Subject = "The Hotel Show Saudi Arabia 2015  – " + txtCompany_name.Text + " – " + StandNo + " - FORM " + formno + " - " + Taskname.ToUpper() + " FORM - submitted";
        sBody1 = "<html><body><table width='100%' cellpadding='8' style='font-family:Arial, Helvetica, sans-serif; font-size:12px;' cellspacing='0' border='0'>"
            + "<tr><td colspan='2'>Dear  " + txtContact.Text + "</td></tr>"
            + "<tr><td colspan='2'>" + txtCompany_name.Text + " You have submitted <b> FORM " + formno + " - " + Taskname + " form </b>. <br><br>The details you have filled in are as below :</td></tr>"
            + FormCodeMail()
            + "<tr><td colspan='2'><br><br>The Hotel Show Saudi Arabia 2015<br>Online Manual Team</td></tr>"
            + "</table></body></html>";

        oMail1.Body = sBody1;
        SmtpClient oSmtp1 = new SmtpClient();
        //oSmtp1.Host = "localhost";
        //oSmtp1.Host = "89.234.4.213";
        //oSmtp1.Port = 25;
        oSmtp1.Send(oMail1);


    }

// Code for form data to sent in all mails
    private string FormCodeMail()
    {
        string formBody = string.Empty;

        string param1 = string.Empty;
        if (TextBox1.Text != "")
        {
            param1 = "<tr><td width='40%'><b>Type of Exhibit :</b> </td><td width='60%'>" + TextBox1.Text + "</td></tr>";
        }
        string param2 = string.Empty;
        if (TextBox2.Text != "")
        {
            param2 = "<tr><td width='40%'><b>In case of vehicle display: Type & Registration No. :</b> </td><td width='60%'>" + TextBox2.Text + "</td></tr>";
        }
        string param3 = string.Empty;
        if (TextBox3.Text != "" || TextBox4.Text != "" || TextBox5.Text != "")
        {
            param3 = "<tr><td width='40%'><b>Equipment(1). Dimensions :</b> </td><td width='60%'><b>Length (mm) :</b> " + TextBox3.Text + " <br /><b>Width (mm) :</b> " + TextBox4.Text + "<br /><b>Height (mm) :</b> " + TextBox5.Text + "</td></tr>";
        }
        string param4 = string.Empty;
        if (TextBox6.Text != "")
        {
            param4 = "<tr><td width='40%'>Equipment(1). Weight (if exhibiting empty) : </td><td width='60%'>" + TextBox6.Text + "</td></tr>";
        }
        string param5 = string.Empty;
        if (TextBox7.Text != "")
        {
            param5 = "<tr><td width='40%'>Equipment(1). Weight (if exhibiting full) : </td><td width='60%'>" + TextBox7.Text + "</td></tr>";
        }


        string param9 = string.Empty;
        if (TextBox8.Text != "" || TextBox9.Text != "" || TextBox10.Text != "")
        {
            param9 = "<tr><td width='40%'><b>Equipment(2). Dimensions :</b> </td><td width='60%'><b>Length (mm) :</b> " + TextBox8.Text + " <br /><b>Width (mm) :</b> " + TextBox9.Text + "<br /><b>Height (mm) :</b> " + TextBox10.Text + "</td></tr>";
        }
        string param10 = string.Empty;
        if (TextBox11.Text != "")
        {
            param10 = "<tr><td width='40%'>Equipment(2). Weight (if exhibiting empty) : </td><td width='60%'>" + TextBox11.Text + "</td></tr>";
        }
        string param11 = string.Empty;
        if (TextBox12.Text != "")
        {
            param11 = "<tr><td width='40%'>Equipment(2). Weight (if exhibiting full) : </td><td width='60%'>" + TextBox12.Text + "</td></tr>";
        }



        string param12 = string.Empty;
        if (TextBox13.Text != "" || TextBox14.Text != "" || TextBox15.Text != "")
        {
            param12 = "<tr><td width='40%'><b>Equipment(3). Dimensions :</b> </td><td width='60%'><b>Length (mm) :</b> " + TextBox13.Text + " <br /><b>Width (mm) :</b> " + TextBox14.Text + "<br /><b>Height (mm) :</b> " + TextBox15.Text + "</td></tr>";
        }
        string param13 = string.Empty;
        if (TextBox16.Text != "")
        {
            param13 = "<tr><td width='40%'>Equipment(3). Weight (if exhibiting empty) : </td><td width='60%'>" + TextBox16.Text + "</td></tr>";
        }
        string param14 = string.Empty;
        if (TextBox17.Text != "")
        {
            param14 = "<tr><td width='40%'>Equipment(3). Weight (if exhibiting full) : </td><td width='60%'>" + TextBox17.Text + "</td></tr>";
        }


        string param6 = string.Empty;
        if (lblview1.Text != "")
        {
            param6 = "<tr><td width='40%'><b>Uploaded document 1: </b></td><td width='80%'>" + lblview1.Text + "</td></tr>";
        }

        string param7 = string.Empty;
        if (lblview2.Text != "")
        {
            param7 = "<tr><td width='40%'><b>Uploaded document 2: </b></td><td width='80%'>" + lblview2.Text + "</td></tr>";
        }

        string param8 = string.Empty;
        if (lblview3.Text != "")
        {
            param8 = "<tr><td width='40%'><b>Uploaded document 3: </b></td><td width='80%'>" + lblview3.Text + "</td></tr>";
        }



        formBody = "<tr style='background-color:#6C6B6B'><td colspan='2' align='left'><font color='white'><b>COMPANY DETAILS :</b></font></td></tr>"
               + "<tr><td width='40%'>Company Name : </td><td width='60%'>" + txtCompany_name.Text + "</td></tr>"
            //// + "<tr><td width='40%'>Banner Name : </td><td width='60%'>" + txtBanner_name.Text + "</td></tr>"
               + "<tr><td width='40%'>Stand Number : </td><td width='60%'>" + lblStandNo.Text + "</td></tr>"
               + "<tr><td width='40%'>Stand Type : </td><td width='60%'>" + lblExhibitorType.Text + "</td></tr>"
               + "<tr><td width='40%'>Contact Name : </td><td width='60%'>" + txtContact.Text + "</td></tr>"
               + "<tr><td width='40%'>Position : </td><td width='60%'>" + lbltitle.Text + "</td></tr>"
               + "<tr><td width='40%'>PO Box : </td><td width='60%'>" + txtAdr1.Text + "</td></tr>"
               + "<tr><td width='40%'>Street : </td><td width='60%'>" + txtAdr2.Text + "</td></tr>"
            //+ "<tr><td width='40%'>Other Address : </td><td width='60%'>" + txtAdr3.Text + "</td></tr>"
               + "<tr><td width='40%'>Country : </td><td width='60%'>" + txtCountry.Text + "</td></tr>"
               + "<tr><td width='40%'>City : </td><td width='60%'>" + txtcity.Text + "</td></tr>"
               + "<tr><td width='40%'>State/Province : </td><td width='60%'>" + lblstate.Text + "</td></tr>"
               + "<tr><td width='40%'>Zip/Postal Code : </td><td width='60%'>" + txtPostcode.Text + "</td></tr>"
               + "<tr><td width='40%'>Mobile : </td><td width='60%'>" + txtMobile.Text + "</td></tr>"
               + "<tr><td width='40%'>Telephone : </td><td width='60%'>" + txtTel.Text + "</td></tr>"
               + "<tr><td width='40%'>Fax : </td><td width='60%'>" + txtFax.Text + "</td></tr>"
               + "<tr><td width='40%'>Website Address : </td><td width='60%'>" + txtWeb.Text + "</td></tr>"
               + "<tr><td width='40%'>Email Address : </td><td width='60%'>" + txtEmail.Text + "</td></tr>"
               + "<tr><td width='40%'>&nbsp;</td><td width='60%'>&nbsp;</td></tr>"
                     + "<tr style='background-color:#6C6B6B'><td colspan='2' align='left'><font color='white'><b>HEAVY MACHINERY  :</b></font></td></tr>"
                     + param1 + param2 + param3 + param4 + param5
                       + param9 + param10 + param11 + param12 + param13 + param14
                     + param6 + param7 + param8
                     + "<tr><td width='40%'>&nbsp;</td><td width='60%'>&nbsp;</td></tr>"
                     + "";

        return formBody;

    }

//Mail Format with break line in Asp.Net C# with @ Symbol Example 
string strlblsave = @"<table><tr><td>
<strong>COMPLEX STANDS & STANDS OVER 4M IN HEIGHT</strong> <br />
There are special  restrictions for complex stands and stands over 4m in height. Such stands must  provide <u>4 sets</u> of detailed stand plans and structural calculations in  English. These must be sent to Operations (Suzanne Rowland, <a href='mailto:srowland@divcom.co.uk'>srowland@divcom.co.uk</a>). Stand plans and  structural calculations will also have to be submitted to the event Structural  Engineer, which will incur additional costs to be met by the exhibitor. <strong>A  fee of approx. &pound;250 +VAT for structural inspection will be charged for stands  exceeding 4m in height.&nbsp; </strong><br />
<br />
<strong>CONTRACTORS & CONTRACTOR MANUAL</strong> <br />
If you are using a stand designer / contractor it is strongly recommended  that you appoint a member of the Event Supplier and Services Association (ESSA)  &ndash; <a href='http://www.aeo.org.uk' target='_blank'>www.aeo.org.uk</a>
<br />
  <br />
For Disabled Facilities at the venue please refer to Olympia website <a href='http://www.olympia.co.uk/' target='_blank'>www.olympia.co.uk</a> <br />
  <br />
  The following websites provide some useful information about the DDA and it&rsquo;s  implications: -
<ul type='square'>
<li><a href='http://www.disability.gov.uk' target='_blank'>www.disability.gov.uk</a> - provides an explanation of the ramifications of the DDA</li>

<li> <a href='http://www.drc-gb.org' target='_blank'>www.drc-gb.org</a> - the website of the Disability Rights Commission, which is the government agency responsible for providing guidance on the DDA and how to comply with it. The DRC has prepared a Code of Practice on this part of the DDA. A copy can be downloaded from the website</li>
<li> <a href='http://www.ddaservices.co.uk' target='_blank'>www.ddaservices.co.uk</a> - provides information on how to comply with the DDA</li>
</ul>
<strong><u>Please note:&nbsp; If  you require either 24-hour power on any stands, or temporary power during  build-up and breakdown periods, please organise this in advance.</u></strong></td>
</tr></table>"

8. Upload PDF, Images etc, Use of Upload control in Asp.Net C# with restrict size, height and width.

<tr>
                                    <td>
                                        <hr style="color: #C5C6CA" />
                                        <strong>Upload Document 1:</strong>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="UploadImage1"
                                            ValidationExpression=".*\.(PDF|GIF|JPG|JPEG|jpg|gif|jpeg|pdf)" Display="Dynamic"
                                            ErrorMessage="Please upload jpg/gif/pdf files only"></asp:RegularExpressionValidator>
                                        <asp:FileUpload ID="UploadImage1" runat="server" />&nbsp;&nbsp;
                                        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Upload" CausesValidation="false" />
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        <asp:Label ID="lblview1" runat="server"></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;
                                        <asp:Label ID="lbldel1" runat="server"></asp:Label>&nbsp;&nbsp;
                                        <asp:Label ID="lblOutput" ForeColor="Red" runat="server"></asp:Label>
                                    </td>

                                </tr>

    public static bool checkImageContentType(string contentType)
    {
        //check whether the uploaded file is an image or not
        if (contentType == "application/pdf" || contentType == "image/gif" || contentType == "image/jpg" || contentType == "image/pjpeg" || contentType == "image/jpeg")
            return true;
        else
            return false;
    }


protected void Button1_Click(object sender, EventArgs e)
    {
        string sSavePath;
        string sqlquery = string.Empty;

        // Set constant values
        sSavePath = "~/document/";
        //code for uplaoding file
        bool Isupload = true;
        if (UploadImage1.HasFile && checkImageContentType(UploadImage1.PostedFile.ContentType))
        {
            if (Convert.ToDecimal(((UploadImage1.PostedFile.ContentLength) / 1024) / 1024) > 5)
            {
                lblOutput.Text = "Documents cannot exceed 5MB in size";
            }
            else
            {


                if (System.IO.Path.GetExtension(UploadImage1.FileName).ToLower() != ".pdf")
                {
                    System.Drawing.Image oImage = System.Drawing.Image.FromStream(UploadImage1.PostedFile.InputStream);
                    if (oImage.Width > 1024 || oImage.Height > 768)
                    {
                        lblOutput.Text = "Image is greater than 1024 X 768 ";
                        Isupload = false;
                    }
                }
                if (Isupload)
                {
                    HttpPostedFile myFile = UploadImage1.PostedFile;
                    string sFilename = myFile.FileName;
                    string[] Filename = sFilename.Split('.');
                    string File1 = Filename[0];
                    string File2 = Filename[1];
                    string ExId = LoginType;
                    sFilename = ExId + "_1" + formid + System.IO.Path.GetExtension(UploadImage1.FileName);
                    try
                    {
                        myFile.SaveAs(Server.MapPath(sSavePath + sFilename));

                        //Code for table to stored first document name in database

                        SqlCommand doccmd = new SqlCommand("select * from tblManualform16 where eventid='" + Session["eventid"] + "' and formid='" + formid + "' and exhibitorid='" + LoginType + "' ", Conn);
                        Conn.Open();
                        SqlDataReader docdr = doccmd.ExecuteReader();

                        if (docdr.Read())
                        {
                            sqlquery = "update tblManualform16 set ex3='" + sFilename + "' where  eventid='" + Session["eventid"] + "' and exhibitorid='" + LoginType + "' and formid='" + formid + "'";
                        }
                        else
                        {
                            sqlquery = "insert into tblManualform16(eventid,formid,ExhibitorId,companyname,ex3,date1,date2) values('" + Session["eventid"] + "','" + formid + "', '" + LoginType + "','" + txtCompany_name.Text.Replace("'", "''") + "','" + sFilename + "',getdate() ,getdate()) ";
                        }
                        docdr.Close();
                        SqlCommand sqlInsert = new SqlCommand(sqlquery, Conn);
                        sqlInsert.ExecuteNonQuery();

                        Conn.Close();
                        // END of Code

                        Page.RegisterStartupScript("Myscript", "<script language='javascript'>alert('Document uploaded successfully.')</script>");
                        lblOutput.Text = "Document uploaded successfully";
                        lblview1.Visible = true;
                        lbldel1.Visible = true;
                        lblview1.Text = "<a href=https://onlineexhibitormanual.com/hotelshowsaudiarabia15/document/" + sFilename + " target='_blank'>View</a>";
                        lbldel1.Text = "<a href=form16.aspx?delete=first>Delete</a>";

                    }
                    catch (ArgumentException errArgument)
                    {
                        Response.Write(errArgument);
                        System.IO.File.Delete(Server.MapPath(sSavePath + sFilename));
                    }
                }
            }
        }
        else
        {
            Page.RegisterStartupScript("Myscript", "<script language='javascript'>alert('Please upload JPG, GIF or PDF format.')</script>");
            lblOutput.Text = "Please upload JPG, GIF or PDF format";
        }
    }

//Code for deleting the document
            if (Request.QueryString["delete"] == "first")
            {
                string querydel = "update tblManualform16 set ex3='' where eventid='" + Session["eventid"] + "' and exhibitorid='" + LoginType + "' and formid='" + formid + "'";
                Conn.Open();
                SqlCommand sqlInsertdel = new SqlCommand(querydel, Conn);
                sqlInsertdel.ExecuteNonQuery();
                Conn.Close();
                Response.Redirect("form16.aspx");
            }


//Code for populating forms details
if (!string.IsNullOrEmpty(Convert.ToString(drfrm1["ex3"])))
                {
                    lblview1.Visible = true;
                    lbldel1.Visible = true;
                    lblview1.Text = "<a href=https://onlineexhibitormanual.com/hotelshowsaudiarabia15/document/" + Convert.ToString(drfrm1["ex3"]) + " target='_blank'>View</a>";
                    lbldel1.Text = "<a href=form16.aspx?delete=first>Delete</a>";
                    Button1.Enabled = false;
                }
                else
                {
                    lblview1.Visible = false;
                    lbldel1.Visible = false;
                    Button1.Enabled = true;
                }

9. Use of  transaction in Code behind .cs page in Asp.Net C#.


SqlTransaction trans;

    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (lblview1.Text != "" || lblview2.Text != "")
        {
        formStatus = "0";
        formCode();
        }
        else
        {
       
        }
    }

//Code for form of all tables
    private void formCode()
    {
        string sqlquery = string.Empty;
        string sqlquery3 = string.Empty;
        string sqlquery4 = string.Empty;
        string sqlquery5 = string.Empty;

        string chk1 = string.Empty;



        if (CheckBox1.Checked == true)
            chk1 = "Yes";
        else
            chk1 = "No";

        //Code for table tblManualform4
        SqlCommand cmd3 = new SqlCommand("select * from tblManualform23 where eventid='" + Session["eventid"] + "' and formid='" + formid + "' and exhibitorid='" + LoginType + "' ", Conn);
        Conn.Open();
        SqlDataReader sdr3 = cmd3.ExecuteReader();

        if (sdr3.Read())
        {
            sqlquery3 = "update tblManualform23 set ex1='" + chk1 + "',ex30='" + txtFormMessage.Text.Replace("'", "''") + "',date1=getdate() where  eventid='" + Session["eventid"] + "' and formid='" + formid + "' and exhibitorid='" + LoginType + "'";

        }
        else
        {
            sqlquery3 = "insert into tblManualform23(eventid,formid,ExhibitorId,companyname,ex1,ex30,date1,date2) values('" + Session["eventid"] + "','" + formid + "', '" + LoginType + "','" + txtCompany_name.Text.Replace("'", "''") + "','" + chk1 + "','" + txtFormMessage.Text.Replace("'", "''") + "',getdate() ,getdate()) ";

        }

        Conn.Close();
        // END of Code for table tblManualform4

        //Code for table tbl_Manual_FormsDetails

        sqlquery4 = "update tbl_Manual_FormsDetails set formname='" + Taskname + "',exhibitorname='" + txtCompany_name.Text.Replace("'", "''") + "',dateofformupdate=getdate(),emailsentto='" + txtEmail.Text + "',emailsenttoOrganiser='" + adminemail + "',pagename='form23.aspx',pagename1='form23_viewreport.aspx',status='" + formStatus + "',add1='" + Session["ContId"] + "' where  eventid='" + Session["eventid"] + "' and exhibitorid='" + LoginType + "' and formid='" + formid + "'";

        // END of Code for table tbl_Manual_FormsDetails

        Conn.Open();
        trans = Conn.BeginTransaction();

        SqlCommand sqlInsert3 = new SqlCommand(sqlquery3, Conn, trans);
        sqlInsert3.ExecuteNonQuery();


        SqlCommand sqlInsert4 = new SqlCommand(sqlquery4, Conn, trans);
        sqlInsert4.ExecuteNonQuery();



        trans.Commit();
        Conn.Close();
        trans.Dispose();
    }

10. Create and Use captcha in Asp.Net C#

//1st create a page in paste below code in aspx page

<%@ Page language="C#" CodeFile="JpegImage.aspx.cs" AutoEventWireup="true" Inherits="JpegImage" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<title>JpegImage</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body>

</body>
</html>

//Paste below code in cs page

using System.Drawing.Imaging;
using App_Code;

public partial class JpegImage : System.Web.UI.Page {
    protected void Page_Load(object sender, System.EventArgs e) {
        Security Sec = new Security();
        Sec.CheckStatus();
        // Create a CAPTCHA image using the text stored in the Session object.
        CaptchaImage ci = new CaptchaImage(this.Session["CaptchaImageText"].ToString(), 200, 50, "Century Schoolbook");

        // Change the response headers to output a JPEG image.
        this.Response.Clear();
        this.Response.ContentType = "image/jpeg";

        // Write the image to the response stream in JPEG format.
        ci.Image.Save(this.Response.OutputStream, ImageFormat.Jpeg);

        // Dispose of the CAPTCHA image object.
        ci.Dispose();
    }
}

//In which page you want create captcha with below code in that page in both aspx as well as cs page.

<div id="divCaptcha" runat="server">
                                <br />
                                <div style="width: 200px;">
                                    <img src="JpegImage.aspx" alt="">
                                </div>
                                <div id="lblImage" style="display: none;">
                                    <span style="color: Red;">Required!</span></div>
                                <asp:TextBox ID="CaptchaTextBox" runat="server" CssClass="number3"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" ControlToValidate="CaptchaTextBox"
                                    ErrorMessage="Please enter Image Verification Code." SetFocusOnError="True" Display="Dynamic"
                                    ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ControlToValidate="CaptchaTextBox"
                                    ValidationExpression="[^<>%;]+" ErrorMessage="Special symbols(<>%;) are not allowed."
                                    Display="Dynamic" SetFocusOnError="True"></asp:RegularExpressionValidator>
                                <asp:Label ID="lblcaptchaerror" runat="server" Text="" ForeColor="Red"></asp:Label>
                            </div>


    protected string slblimage = string.Empty;
    private Random random = new Random();

    protected void btnSubmit_click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {

            if (CaptchaTextBox.Text == Convert.ToString(this.Session["CaptchaImageText"]))
            {
                SubmitData();
            }
            else
            {
                lblcaptchaerror.Text = "ERROR: Incorrect, try again.";
                this.Session["CaptchaImageText"] = GenerateRandomCode();
            }
        }
        //else
        //{
        //    //lblmessages.Text = "please select the UBM INDIA Privacy Statement.";
        //}

    }

    private string GenerateRandomCode()
    {
        string s = "";
        for (int i = 0; i < 6; i++)
        {
            s = String.Concat(s, this.random.Next(10).ToString());
        }
        //lblImage.Text=s;
        slblimage = s;
        return s;

    }


    protected void Page_Load(object sender, EventArgs e)
    {

        Security vvv = new Security();
        vvv.CheckStatus();
        Session["eventid"] = "event478";


        if (!IsPostBack)
        {
            //gettingFormContent();
            this.Session["CaptchaImageText"] = GenerateRandomCode();
        }
    }

11. How to generate pdf in asp.net with protected by password and send in Mail

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Net.Mail;
using AjaxControlToolkit;
using System.IO;
using iTextSharp.text.pdf;
using iTextSharp.text;
using System.Diagnostics;
using System.Text;



string path = Server.MapPath("~/cardPDF/");
string fileName = LoginType + "_" + formid + ".pdf";
string MFileName = string.Empty;
object TargetFile = path + fileName;
//Bind PDF
BindData(path, fileName);
iTextSharp.text.pdf.PdfReader reader = new iTextSharp.text.pdf.PdfReader(TargetFile.ToString());
MFileName = TargetFile.ToString();
MFileName = MFileName.Insert(MFileName.Length - 4, "manual");
iTextSharp.text.pdf.PdfEncryptor.Encrypt(reader, new FileStream(MFileName, FileMode.Append), iTextSharp.text.pdf.PdfWriter.STRENGTH128BITS, "14_100Optical_07", "", iTextSharp.text.pdf.PdfWriter.AllowPrinting);
if (File.Exists(TargetFile.ToString()))
File.Delete(TargetFile.ToString());



//method to generate the pdf

private void BindData(string path, string fileName)
    {
        try
        {
            Document doc = new Document(PageSize.A4, 3, 3, 3, 3);
            PdfWriter.GetInstance(doc, new FileStream(path + fileName, FileMode.Create));
            doc.Open();
            //Title
            PdfPTable Titletab = new PdfPTable(1);
            PdfPCell Titlecell = new PdfPCell(new Phrase("CREDIT CARD INFORMATION"));
            //Titlecell.Colspan = 4;
            Titlecell.HorizontalAlignment = 1; //0=Left, 1=Centre, 2=Right            
            Titletab.AddCell(Titlecell);

            //Main Table
            PdfPTable Maintab = new PdfPTable(2);
            PdfPCell Maincell3 = new PdfPCell();

            //Row 1        
            Maintab.AddCell("Type of Card : ");
            Maintab.AddCell(chkcardtype.Text);

            //Row 2
            Maintab.AddCell("Name of Card Holder :");
            Maintab.AddCell(txtcardholdername.Text);

            //Row 3        
            Maintab.AddCell("Card Number : ");
            Maintab.AddCell(txtcardnumber.Text);

            //Row 4
            Maintab.AddCell("Expiry Date:");
            Maintab.AddCell(txtexpiry.Text);

            //Row 5
            Maintab.AddCell("Issue Number:");
            Maintab.AddCell(txtissuenumber.Text);

            //Row 6      
            Maintab.AddCell("Valid From Date : ");
            Maintab.AddCell(txtvaliddate.Text);

            //Row 7    
            Maintab.AddCell("3 Digit security code: ");
            Maintab.AddCell(txtcode.Text);

            //Row 8
            Maintab.AddCell("Signature:");
            Maintab.AddCell(txtsignature.Text);

            //Row 9
            Maintab.AddCell("Address:");
            Maintab.AddCell(txtcardaddress.Text);

            doc.Add(Titletab);
            doc.Add(Maintab);
            doc.Close();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }



//Send mail with above generate pdf as Subject mail

        //Mail code for organiser
        string sBody1 = string.Empty;
        MailMessage oMail1 = new MailMessage();
        oMail1.To.Add(adminemail.TrimEnd());
        MailAddress oAddress1 = new MailAddress(txtEmail.Text.TrimEnd());
        oMail1.IsBodyHtml = true;
        oMail1.From = oAddress1;
        oMail1.Priority = MailPriority.Normal;

        //Code for attachments
        if (CheckBox3.Checked == true)
            oMail1.Attachments.Add(new Attachment("d:/manual/100proptical14/cardPDF/" + fileName + ""));
        oMail1.Subject = "100 % Optical 2014  – " + txtCompany_name.Text + " – " + StandNo + " - FORM " + formno + " - " + Taskname.ToUpper() + " FORM - submitted";

        sBody1 = "<html><body><table width='100%' cellpadding='8' style='font-family:Arial, Helvetica, sans-serif; font-size:12px;' cellspacing='0' border='0'>"
            + "<tr><td colspan='2'>Dear  " + txtContact.Text + "</td></tr>"
            + "<tr><td colspan='2'>" + txtCompany_name.Text + " You have submitted <b> FORM " + formno + " - " + Taskname + " form </b>. <br><br>The details you have filled in are as below :</td></tr>"
            + FormCodeMail()
            + "<tr><td colspan='2'><br><br>100 % Optical 2014 <br>Online Manual Team</td></tr>"
            + "</table></body></html>";

        oMail1.Body = sBody1;
        SmtpClient oSmtp1 = new SmtpClient();
        //oSmtp1.Host = "localhost";
        //oSmtp1.Host = "89.234.4.213";
        //oSmtp1.Port = 25;
        oSmtp1.Send(oMail1);


//Config setting  has seperate like <system.web>

<system.net>
<mailSettings>
<!--<smtp deliveryMethod="Network">-->
<smtp>
<network host="524754-WEB2" userName="websupport@themescreations.com" password="Gaurav123" defaultCredentials="false" port="25"/>
</smtp>
</mailSettings>

</system.net>

12. Import Data from grid view to Excel sheet in Asp.Net C#.

<td colspan="2">
                    <asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click">Click here</asp:LinkButton>
                    to download excel reports
                </td>
    // Bind Grid on page Load
    protected void Page_Load(object sender, EventArgs e)
    {
        Security vvv = new Security();
        vvv.abc();
        if (!IsPostBack)
        {
            BindGrid();
        }
    }
    // Bind Grid Function
    private void BindGrid()
    {
        SqlDataAdapter oadapter = new SqlDataAdapter("select Row_Number() over (order by company_name) as SNo,company_name as 'COMPANY NAME',boothnumber as 'STAND',email as 'EMAIL ADDRESS', exid from tblexreginfo where eventid='" + Session["eventid"] + "' order by company_name", conn);
        DataTable ds = new DataTable();
        oadapter.Fill(ds);
        GridView1.DataSource = ds;
        GridView1.DataBind();
        ds.Columns.Remove("exid");
        ViewState["grddata"] = ds;
    }

    // fuction for download excel sheet report
    private void load_data()
    {
        // Excel Download Code
        System.Web.HttpContext.Current.Response.Clear();
        System.Web.HttpContext.Current.Response.Buffer = true;
        System.Web.HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;
        System.Web.HttpContext.Current.Response.Charset = "utf-8";
        HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.GetEncoding(1252);
        System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=Reminder_All_Exhibitor.xls");


        // Import In Excel from datagrid
        System.IO.StringWriter stringWrite = new System.IO.StringWriter();
        System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(stringWrite);
        System.Web.UI.WebControls.DataGrid dg = new System.Web.UI.WebControls.DataGrid();

        dg.DataSource = (DataTable)ViewState["grddata"];
        dg.DataBind();

        dg.ForeColor = ColorTranslator.FromHtml("#333333");
        dg.BackColor = ColorTranslator.FromHtml("#F7F6F3");
        dg.Style.Add("width", "100%");
        dg.HeaderStyle.BackColor = Color.Gray;
        dg.HeaderStyle.Font.Bold = true;
        dg.HeaderStyle.ForeColor = ColorTranslator.FromHtml("White");
        dg.AlternatingItemStyle.ForeColor = ColorTranslator.FromHtml("#284775");
        dg.AlternatingItemStyle.BackColor = ColorTranslator.FromHtml("White");
        dg.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
        dg.RenderControl(htmlWrite);
        Response.Write(Convert.ToString(stringWrite));
        Response.End();
    }
    // event for download excel sheet report
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        load_data();

    }

12. Create dynamic data table in Asp.Net C# for cart system.

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  protected void Page_Load(object sender, EventArgs e)
  {

    if (!Page.IsPostBack)
    {
      // Create a new table.
      DataTable taskTable = new DataTable("TaskList");

      // Create the columns.
      taskTable.Columns.Add("Id", typeof(int));
      taskTable.Columns.Add("Description", typeof(string));
      taskTable.Columns.Add("IsComplete", typeof(bool) );

      //Add data to the new table.
      for (int i = 0; i < 20; i++)
      {
        DataRow tableRow = taskTable.NewRow();
        tableRow["Id"] = i;
        tableRow["Description"] = "Task " + i.ToString();
        tableRow["IsComplete"] = false;          
        taskTable.Rows.Add(tableRow);
      }

      //Persist the table in the Session object.
      Session["TaskTable"] = taskTable;

      //Bind data to the GridView control.
      BindData();
    }

  }

  protected void TaskGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
  {
    TaskGridView.PageIndex = e.NewPageIndex;
    //Bind data to the GridView control.
    BindData();
  }

  protected void TaskGridView_RowEditing(object sender, GridViewEditEventArgs e)
  {
    //Set the edit index.
    TaskGridView.EditIndex = e.NewEditIndex;
    //Bind data to the GridView control.
    BindData();
  }

  protected void TaskGridView_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
  {
    //Reset the edit index.
    TaskGridView.EditIndex = -1;
    //Bind data to the GridView control.
    BindData();
  }

  protected void TaskGridView_RowUpdating(object sender, GridViewUpdateEventArgs e)
  {  
    //Retrieve the table from the session object.
    DataTable dt = (DataTable)Session["TaskTable"];

    //Update the values.
    GridViewRow row = TaskGridView.Rows[e.RowIndex];
    dt.Rows[row.DataItemIndex]["Id"] = ((TextBox)(row.Cells[1].Controls[0])).Text;
    dt.Rows[row.DataItemIndex]["Description"] = ((TextBox)(row.Cells[2].Controls[0])).Text;
    dt.Rows[row.DataItemIndex]["IsComplete"] = ((CheckBox)(row.Cells[3].Controls[0])).Checked;

    //Reset the edit index.
    TaskGridView.EditIndex = -1;

    //Bind data to the GridView control.
    BindData();
  }

  private void BindData()
  {
    TaskGridView.DataSource = Session["TaskTable"];
    TaskGridView.DataBind();
  }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>GridView example</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

      <asp:GridView ID="TaskGridView" runat="server"
        AutoGenerateEditButton="True"
        AllowPaging="true"
        OnRowEditing="TaskGridView_RowEditing"      
        OnRowCancelingEdit="TaskGridView_RowCancelingEdit"
        OnRowUpdating="TaskGridView_RowUpdating"
        OnPageIndexChanging="TaskGridView_PageIndexChanging">
      </asp:GridView>

    </div>
    </form>
</body>

</html>

13. Use of String Builder class to create XML and interact with Flax or HTML page.

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Net.Mail;
using System.Text;
using System.IO;


public partial class SaveStandData : System.Web.UI.Page
{
    SqlConnection Conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
 
    protected void Page_Load(object sender, EventArgs e)
    {
        StringBuilder strBldr = new StringBuilder();
        if (Request.Form["hallId"] != null)
        {
            string HallNo = Request.Form["hallId"].ToString();
            string DataArray = Request.Form["dataArray"].ToString();
            string XmlDataAry = Request.Form["xmlDataArray"].ToString();

            if ((HallNo != "") && (HallNo != null))
            {
                Conn.Open();

                string queryInsUpd = string.Empty;
                //string query1 = "SELECT emailid,stands FROM tblfloorplan where emailid = '" + email.Trim() + "'";
                string query1 = "SELECT HallNo,DataArray,XmlDataArray FROM tblfloorplan where HallNo = '" + HallNo.Trim() + "'";

                SqlCommand cmdstand = new SqlCommand(query1, Conn);
                SqlDataReader dr = cmdstand.ExecuteReader();
                if (dr.Read())
                {
                    string updateXmlDataArray = string.Empty;
                    if (string.IsNullOrEmpty(XmlDataAry) && string.IsNullOrEmpty(dr["XmlDataArray"].ToString()))
                        updateXmlDataArray = "";
                    else if (!string.IsNullOrEmpty(XmlDataAry) && string.IsNullOrEmpty(dr["XmlDataArray"].ToString()))
                        updateXmlDataArray = XmlDataAry;
                    else if (string.IsNullOrEmpty(XmlDataAry) && !string.IsNullOrEmpty(dr["XmlDataArray"].ToString()))
                        updateXmlDataArray = dr["XmlDataArray"].ToString();
                    else if (!string.IsNullOrEmpty(XmlDataAry) && !string.IsNullOrEmpty(dr["XmlDataArray"].ToString()))
                        updateXmlDataArray = XmlDataAry + ";" + dr["XmlDataArray"].ToString();

                    if (updateXmlDataArray != "")
                    {
                        string newupdatedstands = string.Empty;
                        string[] oldstand = updateXmlDataArray.Split(';');
                        string[] newstand = oldstand.Distinct().ToArray();
                        for (int i = 0; i < newstand.Length; i++)
                        {
                            if (string.IsNullOrEmpty(newupdatedstands))
                                newupdatedstands = newstand[i].ToString();
                            else
                                newupdatedstands += ";" + newstand[i].ToString();
                        }

                        XmlDataAry = newupdatedstands;
                    }
                    else
                        XmlDataAry = updateXmlDataArray;



                    queryInsUpd = "update tblfloorplan set XmlDataArray='" + XmlDataAry + "',UpdateDate=getdate() where HallNo = '" + HallNo.Trim() + "'";
                }
                else
                {
                    queryInsUpd = "insert into tblfloorplan(HallNo,DataArray,XmlDataArray,CreateDate,UpdateDate) values('" + HallNo + "','" + DataArray + "','" + XmlDataAry + "',getdate(),getdate())";
                }

                SqlCommand cmdInsUpd = new SqlCommand(queryInsUpd, Conn);
                cmdInsUpd.ExecuteNonQuery();

                string result = fnRetreiveData(HallNo, DataArray, XmlDataAry);
                Response.Clear();
                Response.ContentType = "text/plain";
                Response.Write(result);
                Response.End();

                //if (IsStand)
                //{
                //    string query = "insert into  FloorPlan(HallNo,StandNo,xPos,yPos,width,height,shapeType,status,standType,icons,active_Status,CreateDate) values('" + HallNo + "','" + StandNo + "','" + xPos + "','" + yPos + "','" + width + "','" + height + "','" + shapeType + "','" + status + "','" + standType + "','" + icons + "','Yes',getdate())";
                //    SqlCommand cmd = new SqlCommand(query, Conn);
                //    cmd.ExecuteNonQuery();
                //    string result = "get" + "|" + fnStoredata(HallNo);
                //    Response.Clear();
                //    Response.ContentType = "text/plain";
                //    Response.Write(result);
                //    Response.End();
                //}
                //else
                //{
                //    Response.Clear();
                //    Response.ContentType = "text/plain";
                //    Response.Write("error" + "|" + fnStoredata(HallNo));
                //    Response.End();
                //}
                Conn.Close();
            }
        }
        else
        {
            Response.Write("Sorry! HallId didn't find");
            Response.End();
        }

    }

    private string fnRetreiveData(string HallNo,String DataArray,string XmlDataAry)
    {
        string strXMLreturn = string.Empty;
        StringBuilder strBldr = new StringBuilder();
        strBldr.Append("<storeduserdata>" + System.Environment.NewLine);
        strBldr.Append("<HallNo>" + HallNo + "</HallNo>" + System.Environment.NewLine);
        strBldr.Append("<DataArray>" + DataArray + "</DataArray>" + System.Environment.NewLine);
        strBldr.Append("<XmlDataArray>" + XmlDataAry + "</XmlDataArray>" + System.Environment.NewLine);
        strBldr.Append("</storeduserdata>");
        strXMLreturn = Convert.ToString(strBldr);
        return strXMLreturn;
    }
}

14. Example of Share with social site in Asp.Net C#
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Share.aspx.cs" Inherits="Share" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">        var switchTo5x = true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">    stLight.options({ publisher: "ab82056c-0034-4370-8218-bfc2316cd82c", doNotHash: false, doNotCopy: false, hashAddressBar: false });</script>
<span class="st_sharethis"></span>

<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">
    stLight.options({
        publisher: 'ab82056c-0034-4370-8218-bfc2316cd82c',
        tracking: 'google',
        embeds: 'true'
    });
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <span class='st_sharethis_large' displayText='ShareThis'></span>
<span class='st_facebook_large' displayText='Facebook'></span>
<span class='st_twitter_large' displayText='Tweet'></span>
<span class='st_linkedin_large' displayText='LinkedIn'></span>
<span class='st_pinterest_large' displayText='Pinterest'></span>
<span class='st_email_large' displayText='Email'></span>

<br />
Dear Visitor,

Thank you for visiting the Ecobuild SEA website. We really value your interest and welcome you to join in on the current conversations as well as offer new ones.

Please share this on your social network profiles using below buttons to invite your friends, colleagues and circle.

Thank You & Best Regards,
Ecobuild SEA Team
- See more at: http://www.ecobuildsea.com/inviteyourwork#sthash.0plWwmDy.dpuf



<!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="addthis_sharing_toolbox"></div>
    </div>
    </form>
</body>

</html>







No comments:

Post a Comment