I want to format the address into a specific html format different than the format provided by ToString(). I know I can concatenate a string and geerate the html but I see the Address Object exposes a method ToString(string pattern, bool isHTML).
Could I use that? What's the format for the pattern string? I have searched and can't find any documentation about this method.
thanks a lot.
Address ToString with pattern
-
- Ensign (ENS)
- Posts: 7
- Joined: Fri Dec 19, 2008 2:15 pm
- Logan Rhodehamel
- Developer
- Posts: 4116
- Joined: Wed Dec 10, 2003 5:26 pm
Re: Address ToString with pattern
Go to Configure -> Regions -> Countries. In the right column is an area to add new countries. By the address format is a link that says "what's this?".
If you click this link it will give you a list of the variables that are supported by the ToString method. It's a simple string substitution. So you could do something like
ToString("[Name]\n[Address]", true)
The boolean ishtml, if true, changes any line break into the <br /> code. If false, it does not do any line break conversions.
If you click this link it will give you a list of the variables that are supported by the ToString method. It's a simple string substitution. So you could do something like
ToString("[Name]\n[Address]", true)
The boolean ishtml, if true, changes any line break into the <br /> code. If false, it does not do any line break conversions.
Cheers,
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Logan

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
-
- Ensign (ENS)
- Posts: 7
- Joined: Fri Dec 19, 2008 2:15 pm
Re: Address ToString with pattern
Thanks Logan.