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

      <bdo id='NRG9L'></bdo><ul id='NRG9L'></ul>
  • <legend id='NRG9L'><style id='NRG9L'><dir id='NRG9L'><q id='NRG9L'></q></dir></style></legend>

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

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

      1. <tfoot id='NRG9L'></tfoot>
      2. ASP.NET:如果使用 onclick,則不會(huì)調(diào)用 OnServerClick 事

        ASP.NET: OnServerClick event handler not called if using onclick(ASP.NET:如果使用 onclick,則不會(huì)調(diào)用 OnServerClick 事件處理程序)
          <i id='DGDwl'><tr id='DGDwl'><dt id='DGDwl'><q id='DGDwl'><span id='DGDwl'><b id='DGDwl'><form id='DGDwl'><ins id='DGDwl'></ins><ul id='DGDwl'></ul><sub id='DGDwl'></sub></form><legend id='DGDwl'></legend><bdo id='DGDwl'><pre id='DGDwl'><center id='DGDwl'></center></pre></bdo></b><th id='DGDwl'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='DGDwl'><tfoot id='DGDwl'></tfoot><dl id='DGDwl'><fieldset id='DGDwl'></fieldset></dl></div>

              <bdo id='DGDwl'></bdo><ul id='DGDwl'></ul>
            • <tfoot id='DGDwl'></tfoot>

                  <tbody id='DGDwl'></tbody>
                <legend id='DGDwl'><style id='DGDwl'><dir id='DGDwl'><q id='DGDwl'></q></dir></style></legend>

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

                  本文介紹了ASP.NET:如果使用 onclick,則不會(huì)調(diào)用 OnServerClick 事件處理程序的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我在這里遇到了一個(gè)特殊的問(wèn)題,我一生都無(wú)法弄清楚解決方案是什么.請(qǐng)注意,以下代碼不是動(dòng)態(tài)創(chuàng)建的,而是立即在我的 aspx 文件中創(chuàng)建的.

                  I have a peculiar problem here and I can't by my life figure out what the solution is. Note that the following code is not dynamically created, but just immediately in my aspx file.

                  <button type="button" runat="server" id="btnSubmit"
                    OnServerClick="btnSubmit_Click" onclick="return confirm('Sure?');">
                      Submit
                  </button>
                  

                  只要我沒有那里有 onclick 屬性,它就可以正常工作,即 OnServerClick 處理程序按應(yīng)有的方式被觸發(fā).但是當(dāng)我使用 onclick 屬性時(shí),無(wú)論我是確認(rèn)還是拒絕確認(rèn)對(duì)話框,它都不是.

                  This works just fine as long as I don't have the onclick attribute there, i.e. the OnServerClick handler is fired as it should. But when I use the onclick attribute it is not, no matter whether I confirm or decline the confirmation dialog box.

                  我做錯(cuò)了什么?謝謝

                  推薦答案

                  如果您查看生成的源代碼,您將看到以下內(nèi)容:

                  If you look at the source code generated you will see the following:

                  onclick="return confirm('Sure?'); __doPostBack('btnSubmit','')"
                  

                  所以發(fā)生的事情是永遠(yuǎn)不會(huì)調(diào)用 _doPostBack.做你正在尋找的東西的hacky方法如下:

                  so what is happening is the _doPostBack is never called. The hacky way to do what you're looking for is the following:

                  <button type="button" runat="server" id="btnSubmit"
                    OnServerClick="btnSubmit_Click" onclick="if (confirm('Sure?')) ">
                  

                  真正正確的方法是使用 Web 控件:

                  The real correct way would be to use a Web Control:

                  <asp:Button runat="server"
                          OnClick="btnSubmit_Click" OnClientClick="return confirm('Sure?')" Text="Submit" />
                  

                  這篇關(guān)于ASP.NET:如果使用 onclick,則不會(huì)調(diào)用 OnServerClick 事件處理程序的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運(yùn)行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時(shí)刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時(shí)突出顯示行)
                  Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)
                  ASP.net C# Gridview ButtonField onclick event(ASP.net C# Gridview ButtonField onclick 事件)

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

                      • <legend id='CY6Zo'><style id='CY6Zo'><dir id='CY6Zo'><q id='CY6Zo'></q></dir></style></legend>

                            <tbody id='CY6Zo'></tbody>
                        1. <tfoot id='CY6Zo'></tfoot>
                          • <small id='CY6Zo'></small><noframes id='CY6Zo'>

                            主站蜘蛛池模板: 二区在线观看 | 亚洲综合在线播放 | 欧美成人一区二区 | 亚洲高清成人在线 | 久草网站 | 亚洲激情专区 | 精品福利视频一区二区三区 | 欧美精品一区二区在线观看 | 日本一区二区视频 | 国产99热在线 | 日韩超碰在线 | 中文字幕亚洲视频 | 高清国产一区二区 | 午夜精品福利视频 | 综合色影院 | 欧美日韩国产中文字幕 | 狠狠狠色丁香婷婷综合久久五月 | 国产精品久久久一区二区三区 | 国产成人免费 | 毛片在线看看 | 免费在线一区二区 | 久久久久久久久国产成人免费 | 99久久99热这里只有精品 | 欧美视频1区 | 午夜免费电影院 | 国产黄色av网站 | 最新高清无码专区 | 国产日韩精品在线 | 91精品一区二区三区久久久久 | h在线播放 | 99热精品6| 51ⅴ精品国产91久久久久久 | 天堂一区二区三区 | 精品久久久久久久久久久久久久 | 亚洲精品成人在线 | 欧美九九九| 国产一级一级毛片 | 国产黄色在线观看 | 91免费在线视频 | 欧美在线观看一区 | 久久国产视频一区 |