Asp.net Response.Redirect with post data
string url = String.Format("{0}://{1}/{2}", Request.Url.Scheme, Request.Url.Authority, "Default.aspx");
Response.Clear();
var sb = new System.Text.StringBuilder();
sb.Append("<html>");
sb.AppendFormat("<body onload='document.forms[0].submit()'>");
sb.AppendFormat("<form action='{0}' method='post'>", url);
sb.AppendFormat("<input type='hidden' name='id' value='{0}'>", id);
sb.AppendFormat("<input type='hidden' name='year' value='{0}'>", year);
sb.AppendFormat("<input type='hidden' name='mid' value='{0}'>", mid);
sb.Append("</form>");
sb.Append("</body>");
sb.Append("</html>");
Response.Write(sb.ToString());
Response.End();
Asp.net Response.Redirect with post data的更多相关文章
- ASP.NET Response.Redirect 丢失 Session的问题(作废,仅供参考)
以前在做ASP.NET开发时一直没注意到一个问题,就是广泛使用的Response.Redirect方法并不会将服务器端在Response中新增或修改的Cookie返回给客户端浏览器,而网站的Sessi ...
- response.redirect 与location.href 的区别
最近做项目时发现,先弹出提示框,再跳转页面 这样写:Jscript.Alert("你好,Hello!"); Response.Redirect("/index.aspx& ...
- 关于ASP.NET MVC中Response.Redirect和RedirectToAction的BUG (跳转后继续执行后面代码而不结束进程)以及处理方法
关于ASP.NET MVC中Response.Redirect和RedirectToAction的BUG (跳转后继续执行后面代码而不结束进程)以及处理方法 在传统的ASP.NET中,使用Resp ...
- ASP.NET - 网页重定向 Response.Redirect()
在网页中使用重定向,意思就是在网站中的某一个页面跳转到另一个页面. Response.Redirect(~/abc.aspx); 使用“~”的作用是可以从任意位置跳转. 如果没有“~”,那么跳转的时候 ...
- asp.net 关于Response.Redirect重定向前无法弹出alert对话框的问题
要实现的功能:某项操作后,使用alert()提示框提示"操作成功"之类的提示,然后使用response.Redirect()来进行页面重定向. 出现的问题:运行代码,操作完成后,直 ...
- asp.net知识汇总-页面跳转Server.Transfer和Response.Redirect
1. Server.Transfer 服务器端跳转 webform1.aspx跳转到webform2.aspx页面 webform1.aspx代码如下: protected void Page_Loa ...
- 高效的使用 Response.Redirect
介绍: 我正在评估一个 ASP.NET Web 项目应用.它有一些可扩展性问题.意味着当网站访问量增加的时候.系统将会变得缓慢.当我查看应用日志.我找到了大量的 ThreadAbortExceptio ...
- 高效的使用Response.Redirect解决一些不必要的问题(转载)
这篇文章主要介绍了如何高效的使用 Response.Redirect解决一些不必要的问题,需要的朋友可以参考下 介绍: 我正在评估一个 ASP.NET Web 项目应用.它有一些可扩展性问题.意味着当 ...
- Server.Transfer VS Response.Redirect – Simplified
https://www.codeproject.com/Articles/775221/Server-Transfer-VS-Response-Redirect-Simplified Introduc ...
随机推荐
- 解决Server Error in '/' Application.方法!
<!-- Web.Config Configuration File --> <configuration> <system.web> ...
- 随机森林实现 MATLAB
matlab 中随机森林工具箱的下载地址: http://code.google.com/p/randomforest-matlab/downloads/detail?name=Windows-Pre ...
- JDK1.7中调用javascript方法
import java.io.File; import javax.script.Invocable; import javax.script.ScriptEngine; import javax.s ...
- SSIS 学习(0):企业离 BI 还有多远?【转】
上一篇文章<<企业需要BI吗?>>发表后,有一些网友反应:BI现在还不火:BI仅仅在一些大企业有用武之地,中小型企业只能是望其项背,遥不可及了:BI仅仅是一些花拳秀腿而已,如果 ...
- android scrollview主要的问题
项目做多了之后,会发现其实 ScrollView嵌套ListVew或者GridView等很常用,但是你也会发现各种奇怪问题产生.根据个人经验现在列出常见问题以及代码最少最简单的解决方法. 问题一 : ...
- LeetCode 3
Longest Substring Without Repeating Characters Given a string, find the length of the longest substr ...
- Rust 学习 0
安装Rust 后,本地有文档: file:///usr/local/share/doc/rust/html/index.html file:///usr/local/share/doc/rust/ht ...
- MyBatis(3.2.3) - Configuring MyBatis using XML, Properties
The properties configuration element can be used to externalize the configuration values into a prop ...
- C#数组比较取值
string strs = string.Empty; string[] strArray1 = { "a", "b", "c& ...
- C#算法基础之递归排序
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...