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

  • <legend id='Hn9Yr'><style id='Hn9Yr'><dir id='Hn9Yr'><q id='Hn9Yr'></q></dir></style></legend>
    <tfoot id='Hn9Yr'></tfoot>

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

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

        從函數調用按鈕 OnClick

        Calling A Button OnClick from a function(從函數調用按鈕 OnClick)

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

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

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

                • 本文介紹了從函數調用按鈕 OnClick的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有一個 OnClick=Button_Click 的按鈕.我想從另一個函數調用 Button_Click 但問題是我需要給它:

                  I have a button with OnClick=Button_Click. I want to call Button_Click from another function but the problem is that I need to give it:

                  (object sender, EventArgs e)
                  

                  我應該為這些參數輸入什么?有什么辦法解決嗎?

                  What should I enter for those parameters? Is there any way around it?

                  推薦答案

                  你可以這樣做

                   Button_Click(null,EventArgs.Empty);
                  

                  雖然我同意最好提取可以從任何地方調用的函數.

                  although I agree that it's better to extract function that could be called from anywhere.

                  例如,如果你有

                  protected void Button_Click(object sender, EventArgs e)
                  {
                    //some list of code      
                  }
                  

                  這段代碼應該放在一些新方法中,然后從 Button_Click 或任何其他方法中調用

                  this code should be put in some new method and then called from Button_Click or any other method

                  private void ExtractedMethod()
                  { 
                   //some list of code
                  }
                  
                   protected void Button_Click(object sender, EventArgs e)
                   {
                    ExtractedMethod();    
                   }
                  

                  我建議您閱讀Martin Fowler 所著的重構:改進現有代碼的設計一書.這是架子上的必備品.你會不時回到那本書,它是永恒的.

                  I recommend you to read a book Refactoring: Improving the Design of Existing Code by Martin Fowler. It's a must on a shelf. You will come back to that book from time to time, it's timeless.

                  這篇關于從函數調用按鈕 OnClick的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  ASP.net C# Gridview ButtonField onclick event(ASP.net C# Gridview ButtonField onclick 事件)

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

                    <bdo id='orXFG'></bdo><ul id='orXFG'></ul>
                      <tfoot id='orXFG'></tfoot>
                        <i id='orXFG'><tr id='orXFG'><dt id='orXFG'><q id='orXFG'><span id='orXFG'><b id='orXFG'><form id='orXFG'><ins id='orXFG'></ins><ul id='orXFG'></ul><sub id='orXFG'></sub></form><legend id='orXFG'></legend><bdo id='orXFG'><pre id='orXFG'><center id='orXFG'></center></pre></bdo></b><th id='orXFG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='orXFG'><tfoot id='orXFG'></tfoot><dl id='orXFG'><fieldset id='orXFG'></fieldset></dl></div>
                        • <legend id='orXFG'><style id='orXFG'><dir id='orXFG'><q id='orXFG'></q></dir></style></legend>
                            <tbody id='orXFG'></tbody>
                          1. 主站蜘蛛池模板: 日本中文在线视频 | 欧美日韩在线精品 | 97av视频 | 日韩亚洲视频 | 免费黄色特级片 | 午夜电影一区二区 | 日韩不卡一区二区三区 | 超碰成人免费 | 国产精品99久久久久久人 | 激情av在线 | 欧美日韩视频一区二区 | 国产精品久久久久久吹潮 | 国产一区视频在线 | 一级片aaa | 日韩欧美国产精品综合嫩v 一区中文字幕 | 日韩在线国产 | 91成人精品 | 国产区一区二区三区 | 好好的日在线视频 | 国产不卡在线观看 | 欧美一区二区综合 | 国产乱码精品1区2区3区 | 国产精品久久久久久久久免费相片 | 日韩视频在线播放 | 欧美极品视频 | 久久久久久网站 | 欧美videosex性极品hd | 亚洲+变态+欧美+另类+精品 | 国产一区二区在线视频 | 91国内视频在线 | 日韩插插| 成人福利视频网站 | 97精品一区二区 | 国产高清视频在线观看 | 欧美日韩三区 | 国产成都精品91一区二区三 | 国产精品一区二区三区久久久 | 国产精久久久久久久妇剪断 | www.午夜| 91精品国产综合久久精品 | www.亚洲国产精品 |