0

I am damn confuse in TabId and ModuleId which need to pass as parameters in Globals.NavigateURL.

I have created a project with 2 UserControl. Now I want to navigate in button click event of first UserControl.

I have reviewed some reference. Most of them suggest to pass TabId, Key and ModuleId. I know Key but I don't know what is TabId and ModuleId and how to get it in my .cs file of usercontrol.

Can anybody please suggest me?

Nanji Mange
  • 2,155
  • 4
  • 29
  • 63

2 Answers2

1

If your module is set up correctly, these should be available to you as they are inherited.

From your question it seems you don't know enough about the framework. I recommend that you get a copy of the DNN 7 book. It's relevant to DNN 8, and should start you off correctly. There are other things available: the wiki and the developer resources there.

Joe Craig
  • 1,244
  • 1
  • 7
  • 7
  • Thanks but just reading is not enough. I must go through examples to check the actual problem raises while develop. – Nanji Mange Nov 07 '16 at 05:15
0

In answering your other question, I told you that the following two lines of code are equivalent:

string miUrl = base.EditUrl("ModuleInfo");
string miUrl = DotNetNuke.Common.Globals.NavigateURL(base.TabId, "ModuleInfo", String.Format("mid={0}", base.ModuleId));

If you inherit from PortalModuleBase, you have access to TabId and ModuleId in the base class. If you only need to navigate to a module control (view) in the same module, base.EditUrl() works fine. You need to use NavigateUrl() if you need to navigate to another module or to another page (tab).

Community
  • 1
  • 1
Fix It Scotty
  • 2,852
  • 11
  • 12