title: Changing a div/text using AJAX
body: <p>Hello there I am totally new to ASP.NET and learning it to my own. I am good at Java J2EE (Struts2 Framework)! I know how can i update or change any control/text inside any div element using struts2 and ajax code.</p>
  
  <p><strong><em>My Problem</em></strong></p>
  
  <p>Actaully, I'm trying to do the same thing in ASP.NET just for the learning! Suppose that I have a Default.aspx page with the javascript and ajax methods as:</p>
  
  <pre><code> &lt;head runat="server"&gt;
    &lt;script
      src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"&gt;
    &lt;/script&gt;
  
    &lt;script type="text/javascript"&gt;
      function Change() {
          $.ajax({
              type: "GET",
              url: "temp.aspx",
  
              dataType: "text/html;charset=utf-8",
              success: function(msg) {
                  $("#changer").html(msg);
              }
          });
      }
    &lt;/script&gt;
    &lt;title&gt;Untitled Page&lt;/title&gt;
   &lt;/head&gt;
  &lt;body&gt;
  
    &lt;div id="changer"&gt;//this is the div i want to update it using ajax
      Hello Old Text
    &lt;/div&gt;
      &lt;input type="button"id="but" value="Hello Changer" onclick="Change()"/&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>and suppose that I have my temp.aspx as:</p>
  
  <pre><code> &lt;head runat="server"&gt;
     &lt;title&gt;Untitled Page&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
  
    &lt;div id="changer"&gt;
      Hello New Text
    &lt;/div&gt;
  
   &lt;/body&gt;
  </code></pre>
  
  <p>I just want to know if this is possible in ASP.NET because with Java I am familiar with such an operation but I don't know why this is not working in case of ASP.NET!</p>
  
  <p>Any hints or clues are favorable for me, Please don't mind for my question because I am totally new to ASP.NET but I am good at Java</p>
  
  <p>Thanks in Advance!</p>