Users who have read my video tutorials or downloaded the source code of the blog project should know that the page jump in my demo is completed on the HTML page. if we add a button of our own Code To complete the page Jump, how do we write the jump code?
Below I will list several common page jumps. You can refer to them.
I. Inter-Module
1) Jump to the ascx page without Parameters
Response. Redirect (editurl ("", "", "ascx page key value "));
2) Jump to the ascx page with Parameters
Response. Redirect (editurl ("", "", "ascx page key value", "blogid1 = blog parameter 1", "blogid2 = blog parameter 2 "));
3) Go to the module homepage on any ascx page without Parameters
Response. Redirect (globals. navigateurl (), true );
4) Go to the module homepage on any ascx page with Parameters
Int inttabid = This. Tabid;
Response. Redirect (globals. navigateurl (inttabid, "", "op = back "));
2. jump between different modules
Dotnetnuke. Entities. modules. modulecontroller objmodules = new dotnetnuke. Entities. modules. modulecontroller ();
Int inttabid = objmodules. getmodulebydefinition (portalsettings. portalid, "DM blog"). Tabid;
1) Inter-module jump without Parameters
Response. Redirect (globals. navigateurl (inttabid ));
2) Inter-module jump with Parameters
Response. Redirect (globals. navigateurl (inttabid, "", "blogid1 = blog parameter 1", "blogid2 = blog parameter 2 "));
3) jump between modules to an ascx page of another module without Parameters
Response. Redirect (globals. navigateurl (inttabid, "ascx page key value "));
4) jump between modules to an ascx page of another module without Parameters
Response. Redirect (globals. navigateurl (inttabid, "ascx page key value", "blogid1 = blog parameter 1", "blogid2 = blog parameter 2 "));