.aspx中的HTML控件 [英] HTML controls in .aspx

查看:87
本文介绍了.aspx中的HTML控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的一个.aspx文件中,我使用了几个HTML控件。对于输入(文本),我可以添加runat =server。但对于Select,我不能。它打破了

In one of my .aspx file, I use several HTML controls. For the Input(Text), I can add runat="server". But for the Select, I can't. It breaks at

Route ID: <select id="routeID" runat="server" onchange="routeIdChange()";> 



并显示解析错误:解析器错误消息:服务器标签格式不正确。

什么是正确的格式?在此先感谢。


and shows Parse Error: Parser Error Message: The server tag is not well formed.
What will be the proper format? Thanks in advance.

推荐答案

Route ID: <select id="routeID" runat="server" onchange="routeIdChange()";> 



我猜SemiColon(; )最后是造成问题。



因此,代码应该是...


I guess the SemiColon (;) at last is creating problem.

So, code should be...

Route ID: <select id="routeID" runat="server" onchange="routeIdChange()"> 


我没有得到你甚至在谈论的内容,但HTML元素格式不正确:';'不应该在标签中,删除它。

-SA
I did not get what you are even talking about, but the HTML element is not well-formed: ';' should not be in the tag, remove it.
—SA


使用此



Use this

<select id="routeID"  runat="server"  önchange="routeIdChange()">
       </select>





我这是问题onchange =routeIdChange(); ,半分号位于onchange客户端事件之外,close标记格式不正确。



I thing this is the issue onchange="routeIdChange()"; , The semicolumn is outside of the onchange client event and close tag is not well formated.


这篇关于.aspx中的HTML控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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