Getting Other Feature Settings from ISettingModule

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/5/2011 9:52:46 PM
Gravatar
Total Posts 2

Getting Other Feature Settings from ISettingModule

Is there a way to get the current value of a different Feature Setting from an ISettingModule control?

I'm developing a module that creates a table using data from a web service.  The first setting is the URL of the web service the data will be pulled from (WebServiceUrl).  The second setting is a list of the fields to be shown in the table.  I am trying to create an ISettingModule for the field selection.  I need to get the WebServiceUrl setting to find out what fields are available.

Is there an easy way to do this?

3/6/2011 5:34:38 AM
Gravatar
Total Posts 18439

Re: Getting Other Feature Settings from ISettingModule

ISettingControl is really only designed for single values but there may be techniques you can use to store a few variables.

For example in the source code under Web/Controls we have CountryStateSettings.ascx which implements ISettingControl but we managed to use it for both Country and State and the State list is driven by the Country list. When we use the SetValue we pass in Country|State and when we use the GetValue it returns Country|State. So it basically uses a pipe separated string to store 2 values. Maybe you could pass in both the url and the field name array and return both from the control. I guess you would just use a different delimiter for the array values so you can split it back out to variables inside the control. Doing this you would have to persist the setting in its concatenated format, but you could parse that back out into properties within your module as well.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.