Author: azharrahi | Posted on: 1/20/2009 11:01:42 PM | Views : 308

Hello
I am new in AJAX with ASP.Net programming.
I want to know how we can pass parameters from Ajax to Web service (i.e. .asmx) file.

Here is sample of AJAX:

xmlHttp.open("GET", "AdminSave.asmx/Save?AboutUsID=" + ID , true);

And the web service file contains:

public bool Save(string AboutUsID)
{
bool save = false;
_AboutUs = new AboutUs();

if (AboutUsID != null)
{
_AboutUs.LoadByPrimaryKey(Convert.ToInt32(AboutUsID));
}
else
{
_AboutUs.AddNew();
}
//_AboutUs.AboutUsDetails = txtDescription.Text;
//_AboutUs.AboutUsDetails = FCK;
//_AboutUs.AboutUsLink = Link;
save = _AboutUs.Save();


return save;
//LoadAboutUs();

}

Let me know how I can pass parameter value from AJAX and get that parameter ...

Go to the complete details ...