本文介绍了post方法asp .net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用c#在asp .net(4.0)中使用html和post方法。
例如
How to use html from and post method in asp .net(4.0) using c#.
e.g
<form name="ecom" method="post" action="redirecting url">
<input type="hidden" name="field1" value="<%= field %>">
<input type="hidden" name="field2" value="<%= field2 %>">
<input type="hidden" name="field3" value="<%= field3 %>">
<input type="submit" name="submit" value="Submit">
</form>
我想用这个,因为我们用经典的ASP或jsp
I want to use this,as we write in classic ASP or jsp
推荐答案
<form id="form1" runat="server">
<div>
<asp:Literal ID="Literal1" runat="server" /><br />
User Name: <asp:TextBox ID="UserName" runat="server" /><br />
Password: <asp:TextBox ID="Password" runat="server" /><br />
<asp:Button ID="Login" runat="server" Text="Log In" />
</div>
</form>
并更改按钮上的onclick事件以重定向
And change the onclick event on the button to redirect
这篇关于post方法asp .net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!