文件操作 - Register.aspx.cs
返回文件管理
返回主菜单
删除本文件
文件: E:\HostingSpaces\kimblycr\alex.kimbly.in\wwwroot\Register.aspx.cs
编辑文件内容
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Text.RegularExpressions; public partial class Register : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void BtnRegister_Click(object sender, EventArgs e) { try { Validatemobnum(txtMobile.Text); } catch (Exception ex) { Response.Write("<script>alert('Incorrect Mobile No');</script>"); txtMobile.Focus(); return; } string EmailID = txtEmail.Text; string Mobile = txtMobile.Text; string Password = txtPassword.Text; string ConfirmPassword = txtConfirmPassword.Text; if (Password.Equals(ConfirmPassword)) { DataTable dt = InsertClass.InsertUsers(EmailID, Mobile, Password); int result = Convert.ToInt32(dt.Rows[0]["Result"]); if (result == -1) { lblError.Visible = true; } else if (result == -2) { Response.Redirect("Payment.aspx?Email=" + EmailID); } } else { Response.Write("<script>alert('Password does not match Confirm password');</script>"); txtPassword.Focus(); } } private void Validatemobnum(string Mobile) { Regex rx1 = new Regex("^[0-9]{10}"); if (!rx1.IsMatch(Mobile)) { throw new Exception("Only Numbers without decimal value are allowed"); } } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件