文本框已更改为下拉列表,然后此错误消息 [英] Text box was changed to a dropdownlist and then this error messase

查看:71
本文介绍了文本框已更改为下拉列表,然后此错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

分析器错误消息:基类包含字段'txt_Brn_Name',但其类型(System.Web.UI.WebControls.TextBox)与控件类型(System.Web.UI.WebControls.DropDownList)不兼容。

 <   asp:DropDownList     ID   =  txt_Brn_Name    runat   =  server    AutoPostBack   =  True  

高度 = 16px onselectedindexchanged = txt_Brn_Name_SelectedIndexChanged

宽度 = 201px >
< asp: ListItem >





下面有一条蓝线下面的陈述



 <   asp:DropDownList     ID   =  txt_Brn_Name    runat   =  server    AutoPostBack   =    





如何更正此错误?



新Bie



谢谢



我尝试了什么:



我在网上搜索了解析,我无法从我发现的内容中找出任何意义

解决方案

您在HTML中更改了它,但在页面类C#代码中没有更改:使用VS查找所有引用,您应该看到CS定义。


HI,



试用一个测试用例:

1.添加一个原始控件下拉列表。

2.比较两个控件。



尝试识别错误并删除

Parser Error Message: The base class includes the field 'txt_Brn_Name', but its type (System.Web.UI.WebControls.TextBox) is not compatible with the type of control (System.Web.UI.WebControls.DropDownList).

<asp:DropDownList ID="txt_Brn_Name" runat="server" AutoPostBack="True"

Height="16px" onselectedindexchanged="txt_Brn_Name_SelectedIndexChanged"

Width="201px">
<asp:ListItem>



There is a blue line under the statement below

<asp:DropDownList ID="txt_Brn_Name" runat="server" AutoPostBack="True" 



How do I correct this error?

New Bie

Thanks

What I have tried:

I searched for the parse on the net and i cant make any meaning out of what I found

解决方案

You changed it in the HTML, but not in your Page class C# code: Use VS to "Find All References" and you should see the CS definition.


HI,

Try a test case :
1. Add an original control of dropdown.
2. Compare both controls.

Try to identify the error and remove that.


这篇关于文本框已更改为下拉列表,然后此错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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