C# Checking if button was clicked

前端 未结 4 1916
情书的邮戳
情书的邮戳 2020-12-30 12:03

I am making a program that should just continue if 2 conditions are given.

The first one, 2 TextBoxs have the same word in and a Button wa

4条回答
  •  [愿得一人]
    2020-12-30 12:14

    These helped me a lot: I wanted to save values from my gridview, and it was reloading my gridview /overriding my new values, as i have IsPostBack inside my PageLoad.

    if (HttpContext.Current.Request["MYCLICKEDBUTTONID"] == null)
    {
       //Do not reload the gridview.
    
    }
    else
    {
       reload my gridview.
    }
    

    SOURCE: http://bytes.com/topic/asp-net/answers/312809-please-help-how-identify-button-clicked

提交回复
热议问题