Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
why is it that this works.
Member member = Member.GetCurrentMember();member.getProperty("bio").Value = "new text"; // TextBox_bio.Text.ToString();
But this does not work?
Member member = Member.GetCurrentMember();member.getProperty("bio").Value = TextBox_bio.Text.ToString();
It makes no sense!?
- Johan
Hi Johan,
Yes that seems odd, what does the following do ?
Member member = Member.GetCurrentMember();member.getProperty("bio").Value = TextBox_bio.Text;
Cheers,
Hendy
a member is logged. and have the option of to edit own content.
you can see the code here.
protected void Button_save_Click(object sender, EventArgs e) { if (Page.IsValid) { member.Text = TextBox_navn.Text.ToString(); member.Email = TextBox_email.Text.ToString(); member.LoginName = TextBox_email.Text.ToString(); member.getProperty("telefon").Value = TextBox_tlf.Text.ToString(); member.getProperty("bio").Value = TextBox_bio.Text.ToString() } }
I can change the content by hard code it, but not out through textbox should I save as admin or something like that?
Just wondering why are you doing a ToString() on a string ?
Can you step though debug to ensure that the following has a value ?
TextBox_navn.Text.ToString();
Hey Hendy
Thank you for helping.
it have a value. and an error "Use the New keyword skabe the instance." I still do not understand why I can not give a value in out through a textbox.
Johan
Johan,
This works for me:
member.getProperty("shippingAddress1").Value = this.ctrlShippingAddress1TextBox.Text; member.getProperty("shippingAddress2").Value = this.ctrlShippingAddress2TextBox.Text;
What error are you getting?
ok now I feel stupid. it is resolved, after having looked at it so much. you become blind.
removed .toString()
have just learned in school to "toString" on anything that does not work. and one can tend to stick with it.
Thanks Hendy, and thanks Jason for replying.
Pretty new to this API
Cheers - Johan
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
edit member property api
why is it that this works.
But this does not work?
Member member = Member.GetCurrentMember();
member.getProperty("bio").Value = TextBox_bio.Text.ToString();
It makes no sense!?
- Johan
Hi Johan,
Yes that seems odd, what does the following do ?
Cheers,
Hendy
a member is logged. and have the option of to edit own content.
you can see the code here.
protected void Button_save_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
member.Text = TextBox_navn.Text.ToString();
member.Email = TextBox_email.Text.ToString();
member.LoginName = TextBox_email.Text.ToString();
member.getProperty("telefon").Value = TextBox_tlf.Text.ToString();
member.getProperty("bio").Value = TextBox_bio.Text.ToString()
}
}
I can change the content by hard code it, but not out through textbox
should I save as admin or something like that?
Hi Johan,
Just wondering why are you doing a ToString() on a string ?
Can you step though debug to ensure that the following has a value ?
Cheers,
Hendy
Hey Hendy
Thank you for helping.
it have a value. and an error "Use the New keyword skabe the instance."
I still do not understand why I can not give a value in out through a textbox.
Johan
Johan,
This works for me:
What error are you getting?
ok now I feel stupid. it is resolved, after having looked at it so much. you become blind.
removed .toString()
have just learned in school to "toString" on anything that does not work.
and one can tend to stick with it.
Thanks Hendy,
and thanks Jason for replying.
Pretty new to this API
Cheers - Johan
is working on a reply...