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
Hey :)
Im doing a sweet project at the moment and im need of a few wise stones hope you can help.
I need to get some propeties from the current member.
The member has a property of datatype multiple textstring(from ucomponents) normally we can access this in razor like
@foreach (var x in Model.list) { @x.InnerText}
This would output like etc.
111
222
But when im in need of a property from the current member i do it like this.
var someProperty = member.getProperty("memHouseOwned").Value.ToString();
When i do this i just get a string like this "111 222" so its just put together and that makes it kinda annoyin to work with.
Can i cast this some how or is there some other way to get properties a more correct way ?
Hi. Afaik, uComponent's multiple textstring returns Xml like
<values> <value>111</value> <value>222</value></values>
So, you need to parse and process it somehow (e.g. using DynamicXml or like that) to put it into the format you need.
yea just as i thought.
I found a solution luckily for me the things entered will always be 3 chars and it has 2 spaces in between so this worked :
string[] someProperty = member.getProperty("memHouseOwned").Value.ToString().Split(default(string[]), StringSplitOptions.RemoveEmptyEntries);
From here i can tryparse them to int and get on with my work :)
but thx for your time
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
membertype properties as array/list
Hey :)
Im doing a sweet project at the moment and im need of a few wise stones hope you can help.
I need to get some propeties from the current member.
The member has a property of datatype multiple textstring(from ucomponents) normally we can access this in razor like
This would output like etc.
111
222
But when im in need of a property from the current member i do it like this.
When i do this i just get a string like this "111 222" so its just put together and that makes it kinda annoyin to work with.
Can i cast this some how or is there some other way to get properties a more correct way ?
Hi. Afaik, uComponent's multiple textstring returns Xml like
So, you need to parse and process it somehow (e.g. using DynamicXml or like that) to put it into the format you need.
yea just as i thought.
I found a solution luckily for me the things entered will always be 3 chars and it has 2 spaces in between so this worked :
From here i can tryparse them to int and get on with my work :)
but thx for your time
is working on a reply...