txt_ifsc.Text = dt.Rows[0]["Ifsc_Code"] == DBNull.Value ? string.Empty : Convert.ToString(dt.Rows[0]["Ifsc_Code"]);
if( dt.Rows[0]["stuphoto"]!=DBNull.Value)
{
imgPhoto.ImageUrl = dt.Rows[0]["stuphoto"] == DBNull.Value ? "dummy.png" : "~/View/TrainingPartner/StudentData/Photo/" + Convert.ToString(dt.Rows[0]["stuphoto"]);
ReqImagePhoto.Enabled = false;
}
else
{
ReqImagePhoto.Enabled = true;
}
string Bankname = dt.Rows[0]["Bank_Name"] == DBNull.Value ? string.Empty : Convert.ToString(dt.Rows[0]["Bank_Name"]);
drp_bankName.ClearSelection();
if (drp_bankName.Items.Contains(new ListItem(Bankname)))
{
drp_bankName.Items.FindByText(Bankname).Selected = true;
}
if (dt.Rows[0]["Marital_Status"] != DBNull.Value )
{
string mstatus = dt.Rows[0]["Marital_Status"] == DBNull.Value ? string.Empty : Convert.ToString(dt.Rows[0]["Marital_Status"]);
if (mstatus.Equals("Single") || mstatus.Equals("Married") || mstatus.Equals("Divorced") || mstatus.Equals("Widowed"))
{
rbtn_martialstatus.ClearSelection();
rbtn_martialstatus.Items.FindByText(mstatus).Selected = true;
}
}
else
{
rbtn_martialstatus.ClearSelection();
}
---------------------ASPX.CS Page Load
cfvDOB.ValueToCompare = DateTime.Now.AddYears(-15).ToString("d");
txt_dob.Attributes.Add("readonly", "readonly");
No comments:
Post a Comment