Solved

Convert concatenated string to a Profile Section

Posted on 2014-01-20
3
174 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 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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