日期:2014-05-17 浏览次数:20507 次
public partial class registrationForm : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["name"] != null)
{
((Label)Master.FindControl("Label1")).Text = Session["name"] as string;
}
if (this.IsPostBack)
{
SaveRegistration();
}
}
private void SaveRegistration()
{
#region
sendEmail(".......@gmail.com", userEmail, name, pwd);
myConnection.Close();
}
private void sendEmail(string sender, string reciever, string recieverName, string passWord)
{
MailAddress send = new MailAddress(sender);
MailAddress recieve = new MailAddress(reciever);
MailMessage message = new MailMessage(send, recieve);
#region
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
if (Session["name"] == null)
{
Response.Redirect("CustomerLogin.aspx");
}
else if (Session["name"] != null)
{
string temp = Session["name"] as string;
MessageBox("you are currently logged in as " + temp);
}
}
private void MessageBox(string message)
{
Label lbl = new Label();
lbl.Text = "<script type='text/javascript'>" + Environment.NewLine + " window.alert(