C# runat server附加属性仅适用于IE
服务器端C# runat server附加属性仅适用于IE,c#,asp.net,vb.net,user-controls,runatserver,C#,Asp.net,Vb.net,User Controls,Runatserver,服务器端 <cc2:FindEntity ID="feCiudad" runat="server" DataKeyField="id" DataTableName="tbl_ciudad" TextBoxDisplayField="descripcion" Width="315px" NoFoundMessage="No existe"></cc2:FindEntity> 我在客户端动态添加了一个属性SelectedValue=1,但在post中,该值
<cc2:FindEntity ID="feCiudad" runat="server" DataKeyField="id"
DataTableName="tbl_ciudad" TextBoxDisplayField="descripcion"
Width="315px" NoFoundMessage="No existe"></cc2:FindEntity>
我在客户端动态添加了一个属性SelectedValue=1,但在post中,该值在Firefox的服务器上变为null,而在IE中,该值在服务器上变为1
为什么 请用相关代码更新你的问题,然后删除评论。据我所知,你是用javascript添加的,而这个javascript只在IE上工作。请发布失败的javascript代码。@Aristos我用javascript添加它,但javascript没有失败,在bNguardar\u中失败单击feCiudad.SelectedValue为空,但在IE feCiudad.SelectedValue中的值正确。
Protected Sub btnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnGuardar.Click If feCiudad.SelectedValue <> Nothing
Then ... In IE the selectedValue is != null
but in other browsers always is null