需要将html按钮控件更改为asp服务器控件但是gettin错误创建控件 [英] need to change html button control to asp server control but gettin error creating control

查看:64
本文介绍了需要将html按钮控件更改为asp服务器控件但是gettin错误创建控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< button class =btn btn-danger btn-large> 取消< / button>

解决方案

使html控制到服务器控件你只需要添加runat =server属性,你的html控件就变成了服务器控件

exa。

< input id =Button1type =buttonrunat =servervalue =button/> 


 <  按钮    class   =  btn btn-danger btn-large    runat   =  server    id   =  button1 > 取消<   / button  < span class =code-keyword>>  





但是不确定服务器端的这个按钮你想要什么。您可以通过访问服务器端的此按钮来设置一些属性来触发事件,您仍然需要将事件附加到此按钮。



~Prashant


<button class="btn btn-danger btn-large"> Cancel</button>

解决方案

to make html control to server control u only need to add runat="server" attribute and ur html control becomes server control
exa.

<input id="Button1" type="button" runat="server" value="button" />


<button class="btn btn-danger btn-large" runat="server" id="button1"> Cancel</button>



However not sure what you want with this button at server side. You can set only some properties by accessing this button at server side as to fire an event, you still need to attach event to this button.

~ Prashant


这篇关于需要将html按钮控件更改为asp服务器控件但是gettin错误创建控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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