Dear Friends
Its common and easy that how to find the DNN module ID for redirecting one module to another. I am posting for those who did not have an idea how to redirect your one custom module to another through programming
public int findPageTabId(string friendlyName, int portalId)
{
int intModTabID = -1;
ModuleInfo objModuleInfo = new ModuleInfo();
ModuleController objModuleContr = new ModuleController();
objModuleInfo = objModuleContr.GetModuleByDefinition(portalId, friendlyName);
intModTabID = objModuleInfo.TabID;
return intModTabID;
}
on the button click or any function you can call this function with redirect option
protected void Button3_Click(object sender, EventArgs e)
{
int tabId=0;
UDF myudf = new UDF();
tabId = myudf.findPageTabId("Your module friendly Name", this.PortalId);
Response.Redirect(Globals.NavigateURL(tabId));
}
Regards
Rashid Imran Bilgrami
http://www.bestvisualization.com
Its common and easy that how to find the DNN module ID for redirecting one module to another. I am posting for those who did not have an idea how to redirect your one custom module to another through programming
public int findPageTabId(string friendlyName, int portalId)
{
int intModTabID = -1;
ModuleInfo objModuleInfo = new ModuleInfo();
ModuleController objModuleContr = new ModuleController();
objModuleInfo = objModuleContr.GetModuleByDefinition(portalId, friendlyName);
intModTabID = objModuleInfo.TabID;
return intModTabID;
}
on the button click or any function you can call this function with redirect option
protected void Button3_Click(object sender, EventArgs e)
{
int tabId=0;
UDF myudf = new UDF();
tabId = myudf.findPageTabId("Your module friendly Name", this.PortalId);
Response.Redirect(Globals.NavigateURL(tabId));
}
Regards
Rashid Imran Bilgrami
http://www.bestvisualization.com
Nice
ReplyDeletethanks
Delete