惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tor Project blog
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
I
InfoQ
The Cloudflare Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理
美团技术团队
B
Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Last Week in AI
Last Week in AI
TaoSecurity Blog
TaoSecurity Blog
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
H
Heimdal Security Blog
爱范儿
爱范儿
博客园_首页
SecWiki News
SecWiki News
腾讯CDC
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
The Register - Security
The Register - Security
N
News | PayPal Newsroom
Recent Commits to openclaw:main
Recent Commits to openclaw:main
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Security Latest
Security Latest
A
Arctic Wolf
P
Privacy & Cybersecurity Law Blog
T
The Blog of Author Tim Ferriss
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
量子位
Schneier on Security
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
Attack and Defense Labs
Attack and Defense Labs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Webroot Blog
Webroot Blog
C
Check Point Blog
Y
Y Combinator Blog
T
The Exploit Database - CXSecurity.com
aimingoo的专栏
aimingoo的专栏
I
Intezer
博客园 - 叶小钗
Cisco Talos Blog
Cisco Talos Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件

博客园 - GDLMO

给12306的建议 在delphi中引用第三方控件时,找不到dcu的解决办法 使用SqlBulkCopy时应注意Sqlserver表中使用缺省值的列 在sqlserver中使用bcp自动导出数据的方法和注意事项 无法识别的属性“requirePermission” sqlserver,将视图或表的记录不重复的插入到另一个表 让单元测试项目也能同步测试主程序的APP.CONFIG 水平太差,虽然认为Linq是个好东东,但有谁能教教我,怎么调试? Sqlserver 插入一条记录时,不重复插入的办法 dnn5.5.1的配置 动态生成ASP.NET按钮时要注意的一个问题 关于EditUrl与NavigateURL的调用问题 The Auto option has been disabled as the DotNetNuke Application cannot connect to a valid SQL Server database SQLite3中TimeStamp的使用问题 博文阅读密码验证 - 博客园 在DNN中使用SqlDataReader ExecuteReader(string connectionString, string spName, params object[] parameterValues)始终无法获得返回值 在DNN中使用jQuery的插件Validate Enter Null Values for DateTime Column of SQL Server(转) Web.Config和Sql Server2005连接字符串总结(转)
DNN常用的几种页面跳转(EditUrl和Globals.NavigateURL)
GDLMO · 2010-11-20 · via 博客园 - GDLMO

DNN常用的几种页面跳转(EditUrl和Globals.NavigateURL)(转载自http://lwzdadi.blog.163.com/blog/static/50968098200891310265286/)

看过我的视频教程或下载过Blog项目源码的用户都应该知道,我在演示中的页面跳转是在HTML页完成的.那么如果我们添加了一个自己的Button,要通过代码来完成页面的跳转,我们要怎么写跳转的代码呢?

下面我就把常用的几种页面间的跳转列出来,大家可以参考一下.

一、相同模块间

1)跳转到ascx页面,不带参数

    Response.Redirect(EditUrl("","","ascx页面Key值"));

2)跳转到ascx页面,带参数

    Response.Redirect(EditUrl("","","ascx页面Key值","BlogID1=Blog参数1","BlogID2=Blog参数2"));

3)任意ascx页面到模块首页,不带参数

    Response.Redirect(Globals.NavigateURL(), true);

4)任意ascx页面到模块首页,带参数

    int intTabID=this.TabId;

    Response.Redirect(Globals.NavigateURL(intTabID,"","op=Back"));

二、不同模块间跳转

    DotNetNuke.Entities.Modules.ModuleController objModules=new    DotNetNuke.Entities.Modules.ModuleController();

    int intTabID=objModules.GetModuleByDefinition(PortalSettings.PortalId,"DM Blog").TabID;

1)模块间跳转,不带参数

    Response.Redirect(Globals.NavigateURL(intTabID));

2)模块间跳转,带参数

    Response.Redirect(Globals.NavigateURL(intTabID,"","BlogID1=Blog参数1","BlogID2=Blog参数2"));

3)模块间跳转到另一模块的某个ascx页面,不带参数

    Response.Redirect(Globals.NavigateURL(intTabID,"ascx页面Key值"));

4)模块间跳转到另一模块的某个ascx页面,不带参数

    Response.Redirect(Globals.NavigateURL(intTabID,"ascx页面Key值","BlogID1=Blog参数1","BlogID2=Blog参数2"));

先写这么多吧,都是比较常用的,也是给自己做一个记录,以后查的时间就方便了。呵呵.