For making an ajax Get call we have to create a page which render's the data expected and here are some code snippets which can be helpful while making a call :
Create a parameters used to refine search or make an criteria . totally optional
var params = {};
params = { 'ProductID': productID};
Now make a call to the page with the params :
$.get('ProductInfoAjaxPage.aspx', params, function (data) {
// add data to the div
$("#getData").html(data);
}, 'html');
Here getData is the div inside the page where we are making ajax call and used to display ajax call response html.
so here you are calling ProductInfoAjaxPage.aspx page and passing a parameter ProductID which
can be used at ProductInfoAjaxPage.aspx page like :
In class file of ProductInfoAjaxPage.aspx page we can write
string productID= HttpContext.Current.Request.Params["ProductID"]; and use it for getting some information
related to that product ID
That's all ,
Cheers :)
Saturday, May 7, 2011
Navitaire : How to change the Trip Availability Request
TripAvailabilityRequest availRequest = (TripAvailabilityRequest)this.SessionStore[SessionKey.TripAvailabilityRequest];
foreach (AvailabilityRequest request in availRequest.AvailabilityRequests)
{
request.BeginDate = DateTime.Now; //Changed Date
request.EndDate = DateTime.Now; //End date will be the same can change it
}
//Save it to the Existing session
this.SessionStore.Remove(SessionKey.TripAvailabilityRequest);
this.SessionStore.Add(SessionKey.TripAvailabilityRequest, availRequest);
Cheers ,
foreach (AvailabilityRequest request in availRequest.AvailabilityRequests)
{
request.BeginDate = DateTime.Now; //Changed Date
request.EndDate = DateTime.Now; //End date will be the same can change it
}
//Save it to the Existing session
this.SessionStore.Remove(SessionKey.TripAvailabilityRequest);
this.SessionStore.Add(SessionKey.TripAvailabilityRequest, availRequest);
Cheers ,
Subscribe to:
Posts (Atom)