如何从html按钮调用cs函数 [英] how to Call cs function from html button
本文介绍了如何从html按钮调用cs函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HTML按钮
<input id="Button1" type="button" value="button" runat="server"/>
.cs文件:
public void display()
{
Response.Redirect("default.aspx");
}
如何从html按钮单击.cs文件中调用显示功能
How to call the display function which is in .cs file from html button click
推荐答案
请改用< asp:button>
并在设计器中绑定click事件.这将在实际的html中生成一个输入.
Use a <asp:button>
instead and just bind the click event in the designer.
This will generate an input in the actual html.
这篇关于如何从html按钮调用cs函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文