久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      • <bdo id='YcLdh'></bdo><ul id='YcLdh'></ul>

      <legend id='YcLdh'><style id='YcLdh'><dir id='YcLdh'><q id='YcLdh'></q></dir></style></legend>

        <tfoot id='YcLdh'></tfoot>

      1. <small id='YcLdh'></small><noframes id='YcLdh'>

        <i id='YcLdh'><tr id='YcLdh'><dt id='YcLdh'><q id='YcLdh'><span id='YcLdh'><b id='YcLdh'><form id='YcLdh'><ins id='YcLdh'></ins><ul id='YcLdh'></ul><sub id='YcLdh'></sub></form><legend id='YcLdh'></legend><bdo id='YcLdh'><pre id='YcLdh'><center id='YcLdh'></center></pre></bdo></b><th id='YcLdh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='YcLdh'><tfoot id='YcLdh'></tfoot><dl id='YcLdh'><fieldset id='YcLdh'></fieldset></dl></div>
      2. 如何在 asp.net-mvc 中的 html 文本框上設置禁用屬性

        how do I set disabled attribute on html textbox in asp.net-mvc?(如何在 asp.net-mvc 中的 html 文本框上設置禁用屬性?)
          <legend id='EbjdB'><style id='EbjdB'><dir id='EbjdB'><q id='EbjdB'></q></dir></style></legend>
        • <small id='EbjdB'></small><noframes id='EbjdB'>

          <tfoot id='EbjdB'></tfoot>
              <tbody id='EbjdB'></tbody>
              • <bdo id='EbjdB'></bdo><ul id='EbjdB'></ul>

                <i id='EbjdB'><tr id='EbjdB'><dt id='EbjdB'><q id='EbjdB'><span id='EbjdB'><b id='EbjdB'><form id='EbjdB'><ins id='EbjdB'></ins><ul id='EbjdB'></ul><sub id='EbjdB'></sub></form><legend id='EbjdB'></legend><bdo id='EbjdB'><pre id='EbjdB'><center id='EbjdB'></center></pre></bdo></b><th id='EbjdB'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='EbjdB'><tfoot id='EbjdB'></tfoot><dl id='EbjdB'><fieldset id='EbjdB'></fieldset></dl></div>

                1. 本文介紹了如何在 asp.net-mvc 中的 html 文本框上設置禁用屬性?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試在 html 文本框上動態設置 disabled 屬性并遇到問題

                  I am trying to dynamically set the disabled attribute on the html textbox and having issues

                  我認為這是我的嘗試:

                   string disabledString = "";
                   if (SomeLogic)
                   {
                        disabledString = "disabled";
                   }
                  
                   Html.Textbox()...new Dictionary<string, object> { { "maxlength", 50 }, { "disabled", readOnlyState } })%>
                  

                  如您所見,我將 disabled 屬性設置為 "" 或禁用,但是當我測試時,它似乎在任何一種情況下都被禁用.我錯過了什么嗎?

                  As you can see I am setting the disabled attribute to "" or disabled but when I test, it seems to be disabled in either case. Am I missing something?

                  推薦答案

                  這對我們來說很難看,因為這里的 HTML 規范很糟糕.

                  This was ugly for us, due to the fact that the HTML spec is lousy here.

                  基本上在我們的視圖代碼中,我們有一些這樣的邏輯:

                  Basically in our view code we had some logic like this:

                  bool isPlatformOwner = false;
                  
                  object disabledAttributes = new { @disabled="disabled", @readonly="readonly" };
                  
                  //omitted code setting isPlatformOwner    
                  
                      if (isPlatformOwner)
                      {
                          disabledAttributes = new { };
                      }
                  

                  然后,對于我們的控件,我們有這樣的:

                  Then, for our controls, we had this:

                  <%=Html.CheckBoxFor(f => f.AddToReleaseIndicator, disabledAttributes)%>
                  

                  匿名類型在這里拯救了我們,但是,就像我說的,它有點難看.

                  Anonymous types saved us here, but, like I said, it got a little ugly.

                  這篇關于如何在 asp.net-mvc 中的 html 文本框上設置禁用屬性?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  html2canvas captures everything except the content of an inner canvas(html2canvas 捕獲除內部畫布內容之外的所有內容)
                  Showing an offline OSM map file. Suggestion: an MB Tiles file with Js.library(顯示離線 OSM 映射文件.建議:一個帶有 Js.library 的 MB Tiles 文件)
                  Clicking a leaflet marker takes you to URL(單擊傳單標記會將您帶到 URL)
                  Assign ID to marker in leaflet(為傳單中的標記分配 ID)
                  Set Leaflet Overlay Off in the Layer Control(在圖層控件中設置 Leaflet Overlay Off)
                  z-index not working as intended(z-index 未按預期工作)

                    <tfoot id='rMyxt'></tfoot>
                      <tbody id='rMyxt'></tbody>

                      • <bdo id='rMyxt'></bdo><ul id='rMyxt'></ul>

                        <i id='rMyxt'><tr id='rMyxt'><dt id='rMyxt'><q id='rMyxt'><span id='rMyxt'><b id='rMyxt'><form id='rMyxt'><ins id='rMyxt'></ins><ul id='rMyxt'></ul><sub id='rMyxt'></sub></form><legend id='rMyxt'></legend><bdo id='rMyxt'><pre id='rMyxt'><center id='rMyxt'></center></pre></bdo></b><th id='rMyxt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='rMyxt'><tfoot id='rMyxt'></tfoot><dl id='rMyxt'><fieldset id='rMyxt'></fieldset></dl></div>

                          <small id='rMyxt'></small><noframes id='rMyxt'>

                          1. <legend id='rMyxt'><style id='rMyxt'><dir id='rMyxt'><q id='rMyxt'></q></dir></style></legend>

                            主站蜘蛛池模板: 999国产精品视频免费 | 久久精品中文 | 欧美激情黄色 | 欧美一级片在线观看 | 九九九久久国产免费 | 91精品国产乱码久久久久久 | 成人免费视频 | 91大神xh98xh系列全部 | 久久久久久国产精品 | 亚洲精品黄色 | 免费国产一区二区视频 | 91久久久久久久久久久 | а_天堂中文最新版地址 | 日韩在线不卡视频 | 91中文视频 | 日韩精品一区二区三区在线观看 | 91xxx在线观看 | 伊人操| 狠狠涩| 中文字幕在线观看一区二区 | 中文字幕在线免费 | 国产成人网 | www.久久久久久久久 | 欧美激情精品久久久久 | 久久久久久免费免费 | 麻豆一区二区三区精品视频 | 黄片毛片免费观看 | 精品国产欧美 | 久久成人免费 | 亚洲一区二区三区免费在线 | 久久久久久国产精品免费免费狐狸 | 久久久久国产精品免费免费搜索 | 欧美综合国产精品久久丁香 | 免费在线观看一区二区 | 一级免费毛片 | 中文字幕亚洲视频 | 亚洲毛片一区二区 | 中文字幕日韩欧美一区二区三区 | 婷婷在线视频 | 九九热在线免费观看 | 91丨九色丨国产在线 |