title: How to set text to label with jQuery?
body: <p>I want to set text to label with jQuery after clicking on button. I wrote code and it works, but after I set text in my label, label return his old state. Here is my code:</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="DynamicWebApplication.WebForm2" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  
      &lt;head runat="server"&gt;
          &lt;title&gt;&lt;/title&gt;
  
          &lt;script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script type="text/javascript"&gt;
              function f() 
              {
                  $('#&lt;%=Label1.ClientID%&gt;').html("hello");  
              }
          &lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;form id="form1" runat="server"&gt;
              &lt;div&gt;
                  &lt;asp:Label ID="Label1" runat="server"&gt;&lt;/asp:Label&gt;
                  &lt;p&gt;&lt;/p&gt;
                  &lt;asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="f();"/&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>