本文整理汇总了C#中Profile.UpdateProfile方法的典型用法代码示例。如果您正苦于以下问题:C# Profile.UpdateProfile方法的具体用法?C# Profile.UpdateProfile怎么用?C# Profile.UpdateProfile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profile
的用法示例。
在下文中一共展示了Profile.UpdateProfile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnUpdate_Click
protected void btnUpdate_Click(object sender, EventArgs e)
{
try
{
string[] MProfile;
lblEMsg.Visible = false;
Profile pro = new Profile();
MProfile = new string[15];
MProfile[0] = txtReg.Text;
MProfile[1] = UserName.Text;
MProfile[2] = Password.Text;
MProfile[3] = txtFName.Text;
MProfile[4] = txtMName.Text;
MProfile[5] = txtLName.Text;
MProfile[6] = txtAddress.Text;
MProfile[7] = Email.Text;
MProfile[8] = txtLline.Text;
MProfile[9] = txtMobile.Text;
if (optMale.Checked == true)
{
MProfile[10] = "M";
}
else
{
MProfile[10] = "F";
}
MProfile[11] = Question.Text;
MProfile[12] = Answer.Text;
MProfile[13] = "A";
if (Session["USER_TYPE"].ToString() == "A")
{
MProfile[14] = "A";
}
else
{
MProfile[14] = "M";
}
bool status;
status = pro.UpdateProfile(MProfile);
if (status == false)
{
lblEMsg.Visible = true;
lblEMsg.Text = "User updation Failed";
}
else
{
Session["MEMBER_ID"] = MProfile[0];
Session["USER_NAME"] = MProfile[1];
Session["PASSWORD"] = MProfile[2];
Session["NAME"] = MProfile[3] + " " + MProfile[4] + " " + MProfile[5];
Session["STATUS"] = MProfile[13];
Session["USER_TYPE"] = MProfile[14];
Response.Redirect("Home.aspx");
return;
}
}
catch (Exception ex)
{
throw ex;
}
}