Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Convert concatenated string to a Profile Section

Posted on 2014-01-20
3
Medium Priority
?
177 Views
Last Modified: 2014-02-05
Hi

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

OR

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


Is there a way to d o this

Andy
0
Comment
Question by:Andy Green
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 39795343
You cannot concatenate in the web.config file.
0
 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 2000 total points
ID: 39795488
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
0
 
LVL 3

Author Closing Comment

by:Andy Green
ID: 39834905
Excellent Thank you. Soz for delay in accepting been on holiday:-)

Andy
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question