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

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
Forbes - Security
Forbes - Security
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
V
Visual Studio Blog
月光博客
月光博客
博客园 - Franky
有赞技术团队
有赞技术团队
宝玉的分享
宝玉的分享
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
The Register - Security
The Register - Security
S
SegmentFault 最新的问题
博客园 - 司徒正美
P
Proofpoint News Feed
Know Your Adversary
Know Your Adversary
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
Arctic Wolf
Cyberwarzone
Cyberwarzone
Simon Willison's Weblog
Simon Willison's Weblog
U
Unit 42
P
Proofpoint News Feed
Scott Helme
Scott Helme
MyScale Blog
MyScale Blog
T
Tenable Blog
Hugging Face - Blog
Hugging Face - Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
P
Palo Alto Networks Blog
V
V2EX
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tailwind CSS Blog
V
Vulnerabilities – Threatpost
Latest news
Latest news
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
Intezer
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
博客园 - 【当耐特】
B
Blog RSS Feed
N
Netflix TechBlog - Medium
Recent Announcements
Recent Announcements
NISL@THU
NISL@THU
C
Cisco Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security

博客园 - Daniel

Interop .NET and J2EE via WebService Contract-first approach 送一点GMail的邀请 从CodeBehind访问页面上的控件(2.0) 一个用户故事的样例(极限编程) 生成Excel报表的最直观方法 给还未曾尝试过Microsoft Enterprise Library的朋友们 渴望XP-勇气篇 渴望XP-测试篇 全球6大广告集团 渴望XP-重构篇 Vista for developers 渴望XP-简单篇 LINQ-sql的终极疯狂 渴望XP-结对篇 真的需要Smart Client吗? Longhorn之三剑客 Oracle sqlplus语句编辑命令 在Oracle 9i isqlplus中使用替换变量 Oracle 9i的isqlplus你用过了吗?
运用PreviousPage简化提交流程
Daniel · 2005-10-01 · via 博客园 - Daniel

若是一个page1.aspx向page2.aspx提交的流程,则在page2.aspx的顶部添加如下声明:
<%@ PreviousPageType VirtualPath="~/page1.aspx" %>设置page1.aspx的PostbackUrl属性为~/page2.aspx。

假设page1.aspx的codebehind中有名为test()的方法,则在page2.aspx中可以这样调用:
  if (PreviousPage != null && PreviousPage.IsCrossPagePostBack)
  {
   return ((page1)PreviousPage).test();
  }

顺便记录一下注册客户端脚本的方法:
static readonly string script = "<script language=\"javascript\">\n" +
"alert (\"Sorry, but we couldn't validate your credit card\");\n" + "</script>";

ClientScript.RegisterStartupScript(script.GetType(), "Error", script);