0
|
1 using System;
|
|
2
|
|
3 namespace PetShop.Web
|
|
4 {
|
|
5 public partial class UserProfile : System.Web.UI.Page
|
|
6 {
|
|
7 protected void Page_Load(object sender, EventArgs e)
|
|
8 {
|
|
9 if (!IsPostBack)
|
|
10 BindUser();
|
|
11 }
|
|
12
|
|
13 protected void btnSubmit_Click(object sender, EventArgs e)
|
|
14 {
|
|
15 Profile.AccountInfo = AddressForm.Address;
|
|
16 Profile.Save();
|
|
17
|
|
18 lblMessage.Text = "Your profile information has been successfully updated.<br> ";
|
|
19 }
|
|
20
|
|
21 private void BindUser()
|
|
22 {
|
|
23 AddressForm.Address = Profile.AccountInfo;
|
|
24 }
|
|
25 }
|
|
26 }
|