* IBM to offer mobile security as a service IBM will start delivering mobile security-as-a-service (MaaS) through its own cloud infrastructure in India, a move that is expected to better address in-country data requirements... IBM Spectrum Computing: IBM has enlarged its portfolio of software-defined infrastructure solutions with cognitive features for workload management.  * LiFi internet technology has been introduced, the new type of wireless internet connection that gives 100 times faster than traditional WiFi -- Invented by Professor Harald Haas from the University of Edinburgh. * Sci. Rachid Yazami has developed a smart chip that charges smartphones in less than 10 minutes. BenQ has launched BlueCore projector - Consumer electronics major BenQ has launched its first BlueCore laser light source projector. For those unaware, devices with BlueCore laser technology have a high contrast output of 80000:1 with an extended lamp life and efficiency. *** 
  Jan 3 2015 10:32PM     John
  0 Comments    2063 Views  
Here you can see the simple code for Ajax in JavaScript. Before using Ajax, you need to add the AjaxControlToolKit.ddl to your bin folder.
You can download from the below link, Click Here

    <form id="form1" runat="server">
        <input type="button" value="Save" class="sub" onclick="ajaxCallMethod()" />


<style type="text/css">
            line-height: 2.0;
            border-radius: 4px;
            border: none;
            font-size: 14px;
            cursor: pointer;
            color: #fff;
            background-color: #00a9da;
            border-color: #0094bf;


Java Script

<script language="javascript" type="text/javascript">
        var xmlHttp;
        function ajaxCallMethod() {
            try {
                xmlHttp = GetXmlHttpObject();
                if (xmlHttp == null) {
                    alert("Your browser does not support AJAX!");
                var url = 'AjaxCall-Javascript.aspx?Pagename=js';
                xmlHttp.onreadystatechange = function () {
                    if (xmlHttp.readyState == 4) {
                        if (xmlHttp.status == 200) {
                        if (xmlHttp.readyState == 4) {
                            // LoadingPage();
      "POST", url, true);
                if (xmlHttp.readyState == 1) {
            } catch (e) {

You can also pass parameter to the page using Query String “Pagename” , shown in above method.

function GetXmlHttpObject() {
            var xmlHttp = null;
            try {
                xmlHttp = new XMLHttpRequest();
            catch (e) {
                try {
                    xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
                catch (e) {
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            return xmlHttp;


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class AjaxCall_Javascript : System.Web.UI.Page
    string returnvalue = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            if ((Request.QueryString["Pagename"] == "js"))
                returnvalue = "Server Responded - The Developer Tips";
                Response.ContentType = "text/XML";

You can see live Ajax call demo from clicking the below Submit button and getting response from server without page reload.

Hi, This is John.I hope this page will helps you to create simple page with JavaScript Ajax.Thanks.

Recent Posts
Create Amazon ElasticCache Using Memcached in CSharp
Oct 29 2018 12:09PM Posted By Amose
Get Google Map Lat Lng (Geo Point) By Pincode in C#
Oct 28 2018 12:09PM Posted By Pranav
Google URL Shortener in C#
Oct 20 2018 12:09PM Posted By Sanjay
Bind Gridview from CSV file in Asp.Net C#
Oct 5 2018 12:09PM Posted By Michael
Call WebService method from jQuery in every 1 minute
Sep 26 2018 12:09PM Posted By John
Gridview custom CSS in ASP.Net
Sep 14 2018 12:09PM Posted By Micheal Ryan
Read excel file and bind to Gridview in C#
Sep 10 2018 12:09PM Posted By Micheal
Follow us on Facebook
Follow us on Google +
Recent post in your Email inbox.
Enter your email address: