Solved

Convert concatenated string to a Profile Section

Posted on 2014-01-20
3
169 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
3 Comments
 
LVL 96

Expert Comment

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

Accepted Solution

by:
paulmacd 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now