Problems encountered when modifying member information today:
Code As follows:
If (session ["userid"]! = NULL)
{
If (! Page. ispostback) // note that you must add this statement here. Otherwise, the statement cannot be modified successfully and the original data is always
{
Qiyevao qvo = (qiyevao) session ["userid"];
Qiyevao qvo1 = qdao. loaduser ("yzwdli", qvo. ID );
Fax. Text = qvo1.fax;
Email. Text = qvo1.email;
Password. Text = qvo1.password;
Name. Text = qvo1.qiyename;
QQ. Text = qvo1.qq;
Tel. Text = qvo1.qiyetel;
Username. Text = qvo1.userid;
Dropdownlist1.items. Add (New listitem ("male", "male "));
Dropdownlist1.items. Add (New listitem ("female", "female "));
For (INT I = 0; I <dropdownlist1.items. Count; I ++)
{
If (dropdownlist1.items [I]. value = qvo1.sex. Trim ())
{
Dropdownlist1.items [I]. Selected = true;
Break;
}
}
}
}
Else
{
Page. response. Redirect (".../userload. aspx ");
}
Concept
If (! This. ispostback) indicates the first load.