none
关于ie10下的asp:dropdownlist问题 RRS feed

  • 问题

  • 我网站下使用dropdownlist在ie10下不能触发服务器端的onchange事件,请问有什么思路没
    ,调试源码发现html里select标签根本没有生成onchange事件,难道是ie10bug?
    2012年11月26日 9:17

答案

  • 尊享无限量精美信纸!立即开通黄钻

    关于IE10下Asp.net控件无法dopostback问题解决方法
                                                
    在项目下新建文件夹App_Browsers,添加文件ie.browser,文件内容如下:
        <browsers>
        <!-- Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4325) -->
        <browser id="IE6Plus" parentID="IE">
            <identification>
                <capability name="majorversion" match="^[6-9]|\d{2,}$" />
            </identification>
            <capabilities>
                <capability name="ecmascriptversion"    value="3.0" />
                <capability name="jscriptversion"       value="5.6" />
                <capability name="javascript"           value="true" />
                <capability name="javascriptversion"    value="1.5" />
                <capability name="msdomversion"         value="${majorversion}.${minorversion}" />
                <capability name="w3cdomversion"        value="1.0" />
                <capability name="ExchangeOmaSupported" value="true" />
                <capability name="activexcontrols"      value="true" />
                <capability name="backgroundsounds"     value="true" />
                <capability name="cookies"              value="true" />
                <capability name="frames"               value="true" />
                <capability name="javaapplets"          value="true" />
                <capability name="supportsCallback"     value="true" />
                <capability name="supportsFileUpload"   value="true" />
                <capability name="supportsMultilineTextBoxDisplay" value="true" />
                <capability name="supportsMaintainScrollPositionOnPostback" value="true" />
                <capability name="supportsVCard"        value="true" />
                <capability name="supportsXmlHttp"      value="true" />
                <capability name="tables"               value="true" />
                <capability name="supportsAccessKeyAttribute"    value="true" />
                <capability name="tagwriter"            value="System.Web.UI.HtmlTextWriter" />
                <capability name="vbscript"             value="true" />
            </capabilities>
        </browser>
        <!-- Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;) -->
        <browser id="IE6to9" parentID="IE6Plus">
          <identification>
            <capability name="majorversion" match="^[6-9]$" />
          </identification>
        </browser>
        <!-- Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;) -->
        <browser id="IE7" parentID="IE6to9">
            <identification>
                <capability name="majorversion" match="^7$" />
            </identification>
            <capabilities>
                <capability name="jscriptversion" value="5.7" />
            </capabilities>
        </browser>
        <!-- Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729) -->
        <browser id="IE8" parentID="IE6to9">
            <identification>
                <capability name="majorversion" match="^8$" />
            </identification>
            <capabilities>
                <capability name="jscriptversion" value="6.0" />
            </capabilities>
        </browser>
      <!-- Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729) -->
      <browser id="IE9" parentID="IE6to9">
        <identification>
          <capability name="majorversion" match="^9$" />
        </identification>
        <capabilities>
          <capability name="jscriptversion" value="6.0" />
        </capabilities>
      </browser>
      <!-- Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) -->
      <browser id="IE10Plus" parentID="IE6Plus">
        <identification>
          <capability name="majorversion" match="\d{2,}" />
        </identification>
        <capabilities>
          <capability name="jscriptversion" value="6.0" />
        </capabilities>
      </browser>
      <gateway id="IEbeta" parentID="IE">
            <identification>
                <capability name="letters" match="^([bB]|ab)" />
            </identification>
            <capture>
            </capture>
            <capabilities>
                <capability name="beta"    value="true" />
            </capabilities>
        </gateway>
    </browsers>


    相信微软正式发布的时候解决这个bug 
    • 已标记为答案 chenxingyu 2012年12月19日 7:19
    2012年12月10日 9:22

全部回复

  • 你好,

    感谢你的反馈,你是指asp.net中的DropDownList 控件么?根据文档的描述,服务端相关的只有SelectedIndexChanged 事件

    DropDownList 事件

    http://msdn.microsoft.com/zh-cn/library/system.web.ui.webcontrols.dropdownlist_events(v=vs.100).aspx


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    2012年11月27日 10:10
    版主
  • well... asp.net 很容易让人们忽略它其实是 browser-server 架构。。。
    2012年12月4日 12:25
  • 尊享无限量精美信纸!立即开通黄钻

    关于IE10下Asp.net控件无法dopostback问题解决方法
                                                
    在项目下新建文件夹App_Browsers,添加文件ie.browser,文件内容如下:
        <browsers>
        <!-- Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4325) -->
        <browser id="IE6Plus" parentID="IE">
            <identification>
                <capability name="majorversion" match="^[6-9]|\d{2,}$" />
            </identification>
            <capabilities>
                <capability name="ecmascriptversion"    value="3.0" />
                <capability name="jscriptversion"       value="5.6" />
                <capability name="javascript"           value="true" />
                <capability name="javascriptversion"    value="1.5" />
                <capability name="msdomversion"         value="${majorversion}.${minorversion}" />
                <capability name="w3cdomversion"        value="1.0" />
                <capability name="ExchangeOmaSupported" value="true" />
                <capability name="activexcontrols"      value="true" />
                <capability name="backgroundsounds"     value="true" />
                <capability name="cookies"              value="true" />
                <capability name="frames"               value="true" />
                <capability name="javaapplets"          value="true" />
                <capability name="supportsCallback"     value="true" />
                <capability name="supportsFileUpload"   value="true" />
                <capability name="supportsMultilineTextBoxDisplay" value="true" />
                <capability name="supportsMaintainScrollPositionOnPostback" value="true" />
                <capability name="supportsVCard"        value="true" />
                <capability name="supportsXmlHttp"      value="true" />
                <capability name="tables"               value="true" />
                <capability name="supportsAccessKeyAttribute"    value="true" />
                <capability name="tagwriter"            value="System.Web.UI.HtmlTextWriter" />
                <capability name="vbscript"             value="true" />
            </capabilities>
        </browser>
        <!-- Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;) -->
        <browser id="IE6to9" parentID="IE6Plus">
          <identification>
            <capability name="majorversion" match="^[6-9]$" />
          </identification>
        </browser>
        <!-- Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;) -->
        <browser id="IE7" parentID="IE6to9">
            <identification>
                <capability name="majorversion" match="^7$" />
            </identification>
            <capabilities>
                <capability name="jscriptversion" value="5.7" />
            </capabilities>
        </browser>
        <!-- Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729) -->
        <browser id="IE8" parentID="IE6to9">
            <identification>
                <capability name="majorversion" match="^8$" />
            </identification>
            <capabilities>
                <capability name="jscriptversion" value="6.0" />
            </capabilities>
        </browser>
      <!-- Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729) -->
      <browser id="IE9" parentID="IE6to9">
        <identification>
          <capability name="majorversion" match="^9$" />
        </identification>
        <capabilities>
          <capability name="jscriptversion" value="6.0" />
        </capabilities>
      </browser>
      <!-- Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) -->
      <browser id="IE10Plus" parentID="IE6Plus">
        <identification>
          <capability name="majorversion" match="\d{2,}" />
        </identification>
        <capabilities>
          <capability name="jscriptversion" value="6.0" />
        </capabilities>
      </browser>
      <gateway id="IEbeta" parentID="IE">
            <identification>
                <capability name="letters" match="^([bB]|ab)" />
            </identification>
            <capture>
            </capture>
            <capabilities>
                <capability name="beta"    value="true" />
            </capabilities>
        </gateway>
    </browsers>


    相信微软正式发布的时候解决这个bug 
    • 已标记为答案 chenxingyu 2012年12月19日 7:19
    2012年12月10日 9:22
  • Why Qzone?
    2013年9月14日 4:38
  • 请问下,在ie9中我用了你标记的答案,但是为什么没有用?

    2014年10月30日 3:18