A
Amadelle
Hi all and thanks in advance,
I am stuck! I can't figure out how to identify which button was clicked on my ASP.NET page in the PostBack event? So what I am trying to do is to is to have an if statement like as follows in the PageLoad:
private void Page_Load(object sender, System.EventArgs e) {
if (!Page.IsPostBack) {
//do something here
} else {
if (btnSave.clicked)
//do something here
else
//do something else
}
I have my methods btnSave_Click and other buttons setup. It is just that when the buttons are clicked they still go through the Page load event and within the pageload event I need to differentiate which one of the buttons are clicked since it is essential to my code.
Am I crazy for wanting to do something like this? It was very easy to do before with ASP?
Thanks for your input!
I am stuck! I can't figure out how to identify which button was clicked on my ASP.NET page in the PostBack event? So what I am trying to do is to is to have an if statement like as follows in the PageLoad:
private void Page_Load(object sender, System.EventArgs e) {
if (!Page.IsPostBack) {
//do something here
} else {
if (btnSave.clicked)
//do something here
else
//do something else
}
I have my methods btnSave_Click and other buttons setup. It is just that when the buttons are clicked they still go through the Page load event and within the pageload event I need to differentiate which one of the buttons are clicked since it is essential to my code.
Am I crazy for wanting to do something like this? It was very easy to do before with ASP?
Thanks for your input!