B
bbawa1
I want to show a mwesage box depending on condition in button click
event. But it doesn't show message right away when I click the button
second time only then it shows me mseeagebox but I want to show
message box right away when it goes into else statement.
int count = VerifyDupRecord(str2, (this.lblUserid11.Text));
if (count == 0)
{
objCmd.ExecuteNonQuery();
}
else
{
btnApplication.Attributes.Add("onclick",
"javascript:alert('You already added this Application');");
objConn.Close();
return;
}
//objCmd.ExecuteNonQuery();
objConn.Close();
this.gdAddUser.DataBind();
}
event. But it doesn't show message right away when I click the button
second time only then it shows me mseeagebox but I want to show
message box right away when it goes into else statement.
int count = VerifyDupRecord(str2, (this.lblUserid11.Text));
if (count == 0)
{
objCmd.ExecuteNonQuery();
}
else
{
btnApplication.Attributes.Add("onclick",
"javascript:alert('You already added this Application');");
objConn.Close();
return;
}
//objCmd.ExecuteNonQuery();
objConn.Close();
this.gdAddUser.DataBind();
}