Here are several methods which can be used to navigate between controls within a DotNetNuke module.
#region Navigation Methods
///
/// Redirects to module view.
///
protected virtual void RedirectToModuleView()
{
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(), true);
}
///
/// Gets the module control URL.
///
/// Name of the control.
///
protected virtual string GetModuleControlUrl(Enum controlName)
{
string[] param = new string[2];
param[0] = MODULE_ID_KEY;
param[1] = ModuleId.ToString();
return DotNetNuke.Common.Globals.NavigateURL(TabId, controlName.ToString(), param);
}
///
/// Gets the module control URL.
///
/// Name of the control.
/// Name of the parameter.
/// The parameter value.
///
protected virtual string GetModuleControlUrl(Enum controlName, string parameterName, int parameterValue)
{
return GetModuleControlUrl(controlName, parameterName, parameterValue.ToString());
}
///
/// Gets the module control URL.
///
/// Name of the control.
/// Name of the parameter.
/// The parameter value.
///
protected virtual string GetModuleControlUrl(Enum controlName, string parameterName, string parameterValue)
{
string[] param = new string[4];
param[0] = MODULE_ID_KEY;
param[1] = ModuleId.ToString();
param[2] = parameterName;
param[3] = parameterValue;
return DotNetNuke.Common.Globals.NavigateURL(TabId, controlName.ToString(), param);
}
///
/// Gets the module control URL.
///
/// Name of the control.
/// The parameters.
///
protected virtual string GetModuleControlUrl(Enum controlName, string[] parameters)
{
List<string> param = new List<string>();
param.Add(MODULE_ID_KEY);
param.Add(ModuleId.ToString());
param.AddRange(parameters);
return DotNetNuke.Common.Globals.NavigateURL(TabId, controlName.ToString(), param.ToArray());
}
#endregion