如何将asp.net代码与html提交按钮集成在一起 [英] how can asp.net code integrated with html submit button

查看:115
本文介绍了如何将asp.net代码与html提交按钮集成在一起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设计了一个静态html页面,其中有一个提交按钮.

当用户单击按钮时,我需要为html控件编写代码(提交按钮).

请帮帮我!

在此先感谢

I designed a static html page in which I have a submit button.

When the user clicks the button I need to write code for html control (submit button).

Please help me!

Thanks in advance

推荐答案

这是通过所谓的代码隐藏"完成的,该代码不在客户端执行,而是在服务器端执行.您可以将其与javascript结合使用以获得更好的性能和用户体验,但操作本身是在服务器上完成的.

在这里查看更多信息:
http://support.microsoft.com/kb/303247 [
This is done with so called "code behind" that is not executed on the client side but server side. You can combine this with javascript for better performance and user experience but the action itself is done on the server.

Have a look here for more info:
http://support.microsoft.com/kb/303247[^]

Good luck!


由于这是一个静态页面,因此您需要使用某种描述性的Javascript才能在单击按钮时触发操作.这里和通过Google都有无数示例.
Since this is a static page you''ll need to use Javascript of some description to trigger an action when the button is clicked. There are a myriad of examples here and through Google.


使用超链接导航到asp.net中的新页面.
请按照以下步骤操作.

< a href ="Home.aspx"> Home</a>
Use Hyperlink for navigation to new page in asp.net.
Follow as below.

<a href="Home.aspx">Home</a>


这篇关于如何将asp.net代码与html提交按钮集成在一起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆