ASPX code is below--
[WebMethod(EnableSession = true)]
[System.Web.Script.Services.ScriptMethod()]
public static void SelectedClassDetails(string RefID)
{
List<ClsMyclassInfo> objClsMyclassInfo = new List<ClsMyclassInfo>();
var FinalResult = HttpContext.Current.Session["FinalResult"].ToString();
XmlDocument xml = new XmlDocument();
xml.LoadXml(FinalResult);
XmlNodeList xnList = xml.SelectNodes("/AvailabilityResponse/ClassAvailabilityResponse[RefID=" + RefID + "]");
foreach (XmlNode node in xnList)
{
//Fetch the Node and Attribute values.
objClsFareResultInfo.Add(new ClsMyclassInfo()
{
RollNo = node["RollNo"].InnerText,
EnrollNo = node["EnrollNo].InnerText,
--
--//Nealry 40 to 50 propertis we set here
});
}
HttpContext.Current.Session["SelectedOut"] = objClsMyclassInfo;
// return objClsFareResultInfo;
}
function FnBooknow(RefID) {
debugger;
var hostName = window.location.host;
$.ajax({
type: "POST",
url: 'http://' + hostName + '/Myfolder/search.aspx/SelectedDetails',
data: '{RefID: "' +RefID+ '" }',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function () {
var hostName = window.location.host;
alert('success');
window.location.href = 'http://' + hostName + '/Myfolder/Display.aspx';
},
failure: function (response) {
debugger;
alert('error');
},
//execute every time
complete: function () {
var hostName = window.location.host;
alert('complete');
window.location.href = 'http://' + hostName + '/JCT/FlightDisplay.aspx';
}
});
Above both code is working properly in Crome IE and another brouser but not working in mozilla firefox. Every time goes in error section but not getting proper error in debugger.
<scripting>
<webServices>
<!-- Update this value to set the max length -->
<jsonSerialization maxJsonLength="2147483647" />
</webServices>
</scripting>
In fiddeler getting size is large so i had added above code in web.config still not working my code. I want to just go on another page after calling a web method(redirect on another page and i am set some value in session we i hit web method.) Kindly help me.