久久久久久久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'>

        從函數(shù)調(diào)用按鈕 OnClick

        Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 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'>

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

                  問題描述

                  限時送ChatGPT賬號..

                  我有一個 OnClick=Button_Click 的按鈕.我想從另一個函數(shù)調(diào)用 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)
                  

                  我應(yīng)該為這些參數(shù)輸入什么?有什么辦法解決嗎?

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

                  推薦答案

                  你可以這樣做

                   Button_Click(null,EventArgs.Empty);
                  

                  雖然我同意最好提取可以從任何地方調(diào)用的函數(shù).

                  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      
                  }
                  

                  這段代碼應(yīng)該放在一些新方法中,然后從 Button_Click 或任何其他方法中調(diào)用

                  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 所著的重構(gòu):改進現(xiàn)有代碼的設(shè)計一書.這是架子上的必備品.你會不時回到那本書,它是永恒的.

                  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.

                  這篇關(guān)于從函數(shù)調(diào)用按鈕 OnClick的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  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. 主站蜘蛛池模板: 综合久久久久 | 久久人| 久久久久亚洲精品 | 亚洲一区二区三区在线免费 | www.国产精| 国产高清在线精品一区二区三区 | 欧美一区二区大片 | 超碰超碰 | 手机av在线 | 久久逼逼 | 嫩草视频免费 | 在线观看国产 | 天天干夜夜操 | 天天天久久久 | 国产在线视频一区二区 | 亚洲国产精品视频一区 | 久久国产电影 | 欧美一区二区三区小说 | 亚洲美女在线一区 | 精品九九九| av一区二区三区 | 日韩欧美一区在线 | 狠狠狠干| 久久一区二区免费视频 | 青青草一区二区 | 欧美极品一区二区 | 99综合在线 | 国产高清av免费观看 | 国产精品自拍av | 欧美日韩国产在线观看 | 91精品国产综合久久久久久丝袜 | 国产一区二区在线播放 | www312aⅴ欧美在线看 | 久久国产精品久久国产精品 | 日韩高清电影 | 欧美亚洲视频在线观看 | 色天天综合 | 精精国产xxxx视频在线 | a在线观看| 久久亚洲欧美日韩精品专区 | 成人午夜精品一区二区三区 |