title: Differences using ajax or post back to post actions
body: <p>So my question is a little weird, as I did not learn about it (ajax approach)</p>
  
  <p>I just reused an original function that I encountered, renamed and tested the function.</p>
  
  <p><strong>So in other different scenario</strong> (more common):</p>
  
  <p>A few <code>&lt;asp:TextBox&gt;</code> controls, one submit button. </p>
  
  <p>What is the advantage of Ajax over c# asp.net PostBack? </p>
  
  <p>This is the code </p>
  
  <pre><code> function AppsName_AjxUpdt(CurrentColumn, recNumSplited, newValue, TBX, ActionRequest, RecordNum) {
          $.ajax({
              type: 'POST',
              url: 'YourPageNameHere.aspx',
              data: {
                  'PostSentByAjax': "true",
                  'CurrentColumn': CurrentColumn,
                  'recNumSplited': recNumSplited,
                  'value': newValue,
                  'ActionRequest': ActionRequest
              },
              success: function (data) {
                  //alert(data);
                  if (type == "UpdateUserID") {
                      TBX.setAttribute(defaultValue, newValue);
  
                      refreshData();
                  }
                  if (type == "reason") {
                      window.form1.submit();
                  }
  
                  if (type == "delete") {
                      document.getElementById("row_" + rowid).style.display = "none";
                      document.getElementById("totalMins").innerHTML = "&lt;span style='text-decoration:underline;color:#A7C942;cursor:pointer;' onclick='refreshData();'&gt;Refresh Results&lt;/span&gt;";
                  }
              }
          });
      }
  </code></pre>
  
  <p>So how different is this code-behavior Vs binding an <code>&lt;asp:TextBox&gt;</code> to autopostback feature?
  I could just say what I <em>did</em> notes,...the advantage I could see is:</p>
  
  <p>Only if you would like to create a dynamic table with embedded c# code within the tags so you could generate elements <code>id</code>'s <code>name</code>s and <code>value</code>s properties, and <strong>in the same time</strong> you want that control to post back by it's own event(and since there's no postback event  for <code>html controls</code>), and if you did apply c# codes within the scope of the tag it could not be while using an asp:TextBox only input type "text".</p>