开发者

asp.net cant redirect form on submit

<form request="post" action="http://google.com">
<input type="开发者_运维知识库text" name="firstname" /><br />
<input type="submit"/>
</form>

When im trying this code in my asp.net webforms app, i dont get redirected. The point is to redirect to another aspx page with some posted values from the form. Is there any other way to solve this? Jquery redirect + ajax post maybe?

Thanks


request is not valid attribute use method="post".

<form method="post" action="http://google.com">
<input type="text" name="firstname" /><br />
<input type="submit"/>
</form>


Note that if you wish to do that via server-side forms (which I see you didn't in your example although you mention webforms) you are in the "realm" of cross-page posting. This is a slightly different scenario since usually a webform will normally post to itself only.

The framework supports cross-page posting via a few particular steps as explained here:

Cross-Page Posting in ASP.NET Web Pages

How to: Post ASP.NET Web Pages to a Different Page

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜