• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

Convert concatenated string to a Profile Section


I have 2 similar groups in my Web.config

<group name="SiteGroupPreferences_1"> & <group name="SiteGroupPreferences_2">

From my code is it possible to concatate SiteGroupPreferences and 1 or 2 such that I can still reference the profile sections.

SiteGroupPreferences = "SiteGroupPreferences"  + 1
Location_ID = Profile.SiteGroupPreferences.Location_ID


SiteGroupPreferences = "Profile.SiteGroupPreferences_" + "1" + ".Location_ID"
Location_ID = SiteGroupPreferences

Is there a way to d o this

Andy Green
Andy Green
1 Solution
Bob LearnedCommented:
You cannot concatenate in the web.config file.
Paul MacDonaldDirector, Information SystemsCommented:
You might be able to do something like...

Location_ID = Profile.GetProfileGroup("SiteGroupPreferences"  & "1").Location_ID

Slightly more information here:   http://msdn.microsoft.com/en-us/library/system.web.profile.profilebase.getprofilegroup(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1
Andy GreenAuthor Commented:
Excellent Thank you. Soz for delay in accepting been on holiday:-)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now