protected void Button1_Click(object sender, EventArgs e)
{
System.DateTime d1 = default(System.DateTime);
if (Strings.Len(Strings.Trim(txtName.Text)) == 0)
{
msg("Name Must Be Present");
txtName.Focus();
return;
}
if (CatList.SelectedIndex == 0)
{
msg("Select Sex");
CatList.Focus();
return;
}
if (Strings.Len(Strings.Trim(txtMobile.Text)) < 10)
{
msg("Invalid Mobile Number");
txtMobile.Focus();
return;
}
if (!Information.IsNumeric(txtMobile.Text))
{
msg("Invalid Mobile Number");
txtMobile.Focus();
return;
}
if (Strings.Len(Strings.Trim(txtEmail.Text)) > 0)
{
//if (!RegularExpressionValidator1.IsValid)
//{
// msg("Invalid Email ID");
txtEmail.Focus();
return;
//}
}
DoctorDTO objDoctor = new DoctorDTO();
objDoctor.DocName = txtName.Text;
objDoctor.DocSex = CatList.SelectedItem.Text;
objDoctor.DocCredential = txtCredential.Text;
objDoctor.DocAddress = txtAddress.Text;
objDoctor.DocRTel = txtRtel.Text;
objDoctor.DocCTel = txtCtel.Text;
objDoctor.DocMobile = txtMobile.Text;
objDoctor.DocEmail = txtEmail.Text;
objDoctor.DocImagePath = Image1.ImageUrl;
List<DoctorDTO> lstDoctors = objService.GetAllDoctors();
lstDoctors = new List<DoctorDTO>(
from l in lstDoctors
where l.DocProfileID.Equals((Session["userid"].ToString()))
select l
);
if (lstDoctors.Count > 0)
{
objService.UpdateAllDoctorDetails(objDoctor);
}
else {
objService.AddDoctorDetails(objDoctor);
}
}
在我的 asp.net 页面中,我在详细信息的文本框中获取某些详细信息,并且我有一个按钮来保存 Button1_Click 上的数据,首先调用一个 java 脚本来检查是否必须保存数据,然后只有数据将是已保存
但是调试器不会点击按钮
请帮助某人