protected void Page_Load(object sender, EventArgs e) { CentraliseEmail cem = new CentraliseEmail(); Response.Write(cem.SendMail()); }
protected void Page_Load(object sender, EventArgs e) { // DateTime dt1 = DateTime.Now.ToString("MM/dd/yyyy"); // string dte =DateTime.Now.ToShortDateString; // string date= Convert.ToDateTime(DateTime.Now).ToString("dd/MM/yyyy"); // // string ConString = WebConfigurationManager.ConnectionStrings["MySQLConnectionString"].ConnectionString; ///* string ConString = "Driver={MySQL ODBC 5.1 Driver};Server=localhost;DATABASE=employees;UID=root;PASSWORD=glspl123;port=3306;charset=UTF8";*/ // // string ConString = "Server=localhost;Database=Employees;user id=root;password=glspl123"; // // string ConString = "Driver={MySQL ODBC 5.1 Driver};" + "Server=209.200.117.22;" + "Database=Employees;" + "user id=nitish;" + "password=nitish;" + "Port=3306"; // OdbcConnection connection = new OdbcConnection("DSN=sptm"); // // OdbcConnection connection = new OdbcConnection(ConString); // string sSQL = "select * from emp_details"; // OdbcDataAdapter ODA = new OdbcDataAdapter(sSQL,connection); // //OdbcDataAdapter oDataAdapter = new OdbcDataAdapter(sSQL, connection); // DataTable dt = new DataTable(); // ODA.Fill(dt); // GRDMYSQL.DataSource = dt; // GRDMYSQL.DataBind(); CentraliseEmail objsendmail = new CentraliseEmail(); objsendmail.SendMail(); }