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

推荐订阅源

I
Intezer
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
N
News | PayPal Newsroom
T
Tenable Blog
Spread Privacy
Spread Privacy
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Secure Thoughts
P
Privacy International News Feed
IT之家
IT之家
Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
博客园_首页
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
NISL@THU
NISL@THU
I
InfoQ
D
DataBreaches.Net
有赞技术团队
有赞技术团队
K
Kaspersky official blog
Security Latest
Security Latest
The Register - Security
The Register - Security
Hugging Face - Blog
Hugging Face - Blog
S
Security @ Cisco Blogs
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
AI
AI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
N
News and Events Feed by Topic

博客园 - 生活需要勇气+毅力

不错的慢嗨曲 hey-ho! 火箭又崩了 都是钱闹的 离歌 忙里偷闲 古有杜甫茅屋为秋风所破歌,今有流民望房兴叹辗转反侧 今儿,不怎么高兴 又见十一 男人 - 生活需要勇气+毅力 - 博客园 换个心情 夜战 where's my love 检测是不是数字加字母的函数 山游小记 2年转瞬即过 大城小爱 滑雪归来 Anyone of us
asp.net中在当前页面组合form的内容,并提交
生活需要勇气+毅力 · 2006-07-03 · via 博客园 - 生活需要勇气+毅力

今天碰到个东东,需要把登陆信息提交到另外一个页面中,另外的那个页面是用asp做的只接收表单信息提交,没办法只好把在这边提交的信息组合成一个表单然后post过去,于是就想到了使用另外一个页面跳转提交的方法,后来发现,如果登陆失败了就没办法返回,搞的很不爽.

实在不想在另外的页面中产生form,于是想到动态生成表单然后使用数据绑定,将生成的表单绑定到当前页面,大致代码如下:

1                    Guidesubmit+="<form name='form1' action='http://www.aaa.com/login.asp' method='post'>              ";
2                    Guidesubmit+="            <input type='hidden' name='Name' size='10' maxlength='15' value='"+Name+"'>";
3                    Guidesubmit+="            <input type='hidden' name='Pass' size='10' maxlength='15' value='"+Password+"'>    ";
4                    Guidesubmit+="        </form>
    5                    Page.DataBind();

在前台使用<%# Guidesubmit%>绑定,然后在提交按扭事件里面add个js方法提交,不过总是不成功.放弃...还是用js的提交吧,改上面代码如下:

1                    Guidesubmit+="<form name='form1' action='http://www.aaa.com/login.asp' method='post'>              ";
2                    Guidesubmit+="            <input type='hidden' name='Name' size='10' maxlength='15' value='"+Name+"'>";
3                    Guidesubmit+="            <input type='hidden' name='Pass' size='10' maxlength='15' value='"+Password+"'>    ";
4                    Guidesubmit+="        </form>";
    5                    Guidesubmit+="        <script>form1.submit()</script>";
    6                    Page.DataBind();

试了一下,还是有登陆失败时用history.go(-1)不能返回的问题,不过把返回页面改成登陆页面就ok了,嘿嘿.