Quantcast
Channel: CSharp Forum Latest Questions
Viewing all articles
Browse latest Browse all 32056

Clear the label status after submit button.

$
0
0
Hi,
 
  I need to clear the label status which is record saved after submitting button.
I used OnClientClick along with OnClick which is not working.

Below is the code:
<scripttype="text/javascript"

function clearLabelValue() {
var label1 = document.getElementById("<%= lblResults.ClientID %>");

label1.value ="";

}


Hi,
 
  I need to clear the label status which is "record saved" after submitting button.
I used OnClientClick along with OnClick which is not working.

Below is the code:
<scripttype="text/javascript"

function clearLabel() {
var label1 = document.getElementById("<%= lblResults.ClientID %>");

label1.value ="";}

asp:ButtonID="Button2"runat="server"Text="Submit"onclick="Button2_Click"OnClientClick="clearLabel()";returnfalse;"/>

OnClientClick and onclick not working at the same time.I read some online posts and even tried by using ! before clearLabel().It is not working.



Viewing all articles
Browse latest Browse all 32056

Trending Articles