For our web site we would like to be able to have a combo box which the end user selects a “Province/State” from the drop down menu. Depending on which “Province/State” he selects, some web parts will be shown (content) and some parts will not be shown.. Is there any way to do this easily with Sharepoint?
My idea was to have some sort of global variables and have them turned true or false, depending on which ones are true/false, shows/hides certain web parts (content). Ideally we would like to have an abstract base class so that every time that we need a conditionally visible webpart, all that we need to do is to implement the condition.. However for now we tried to make a webpart that shows content depending on some query string parameter.. this is what we have..
public class QueryStringTrimmedControl : ConditionallyVisibleControl
{
public string Parameter { get; set; }
public string Value { get; set; }
public override bool ShouldBeVisible
{
get
{
bool shouldBeVisible = Page.Request.QueryString[ParameterName] == Value;
return shouldBeVisible;
}
}
}
Can you inform/help me modify this to reflect web parts?
Thanks and please let me know if Sharepoint provides an easier solution.