Virtual Happy Hour is canceled this month due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month due to Good Friday.
Global
Local
Global
Local
.cs
protected void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
if (PersonalizedData.Current["cbGlobal"] != null)
cbGlobal.Checked = (bool)PersonalizedData.Current["cbGlobal"];
if (PersonalizedData.Current["cbLocal", CurrentPageLink] != null)
cbLocal.Checked = (bool)PersonalizedData.Current["cbLocal", CurrentPageLink];
if (PersonalizedData.Current["tbGlobal"] != null)
tbGlobal.Text = PersonalizedData.Current["tbGlobal"].ToString();
if (PersonalizedData.Current["tbLocal", CurrentPageLink] != null)
tbLocal.Text = PersonalizedData.Current["tbLocal", CurrentPageLink].ToString();
}
}
protected void save(object sender, System.EventArgs e)
{
PersonalizedData.Current["cbGlobal"] = cbGlobal.Checked;
PersonalizedData.Current["cbLocal", CurrentPageLink] = cbLocal.Checked;
PersonalizedData.Current["tbGlobal"] = tbGlobal.Text;
PersonalizedData.Current["tbLocal", CurrentPageLink] = tbLocal.Text;
}
User = new UserSid(SecurityIdentityType.ExtranetUser);
PersonalizedData userData = PersonalizedData.Load(User.Name);
userData["City"] = City.Text;
I don't get any errors but the values are not recorded in the tblUserProperty table. What am I missing in the Register control to register this personal data for the new user?
if(PersonalizedData.Current!=null) { // Print current value if(PersonalizedData.Current["MyTestKey",CurrentPage.PageLink]!=null) Response.Write(PersonalizedData.Current["MyTestKey",CurrentPage.PageLink]);
The question is how to do it for the new users. The Registration page creates a new user but I am not sure how to apply it to the code above. The code for creating the user is:User = new UserSid(SecurityIdentityType.ExtranetUser);
Thanks. Victor