Saturday, March 24, 2012

asp.net 2.0 div in call page

Hi everyone;

I try a div in call the any page but with ie does not work, return this error message "Unknow Runtime Error".

However try with firefox in its work but this browser the return error"System.Web.HttpException: The state information is invalid for this page and might be corrupted.";

What is the problem? Everyone thanks.

your description of the problem is blur. please be more specific and give more details like code sample.


Hi,

this source with call the div in aspx file.

function ajax()
{
var xmlAjax = false;

if(window.ActiveXObject)
{
try
{
xmlAjax = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(err)
{
try
{
xmlAjax = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(err)
{
alert(err)
}
}
}
else if(window.XMLHttpRequest)
{
try
{
xmlAjax = new XMLHttpRequest();
}
catch(err)
{
alert(err);
}
}
else
{
alert('Browser?n?z ajax desteklemiyor');
}
return xmlAjax;
}

var xmlHttp = ajax();

function Loading(url,dvId)
{
if(xmlHttp)
{
xmlHttp.onreadystatechange=function(){
LoadPage(dvId);
}
xmlHttp.open('GET',url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=iso-8859-9")
xmlHttp.send(null);

}
}

function LoadPage(dvId)
{
switch(xmlHttp.readyState)
{
case 3:
document.getElementById(dvId).innerHTML = "Loading";
break;
case 4:
document.getElementById(dvId).innerHTML = xmlHttp.responseText;
break;
}
}

this source run ie, not load the div in aspx page and return error "Unknow Runtime Error";

however this source run firefox, aspx page load but its page in the click the asp:button return error "

The state information is invalid for this page and might be corrupted.

Description:Anunhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror and where it originated in the code.

Exception Details:System.Web.HttpException: The state information is invalid for this page and might be corrupted."

What is the problem ?

Save My God


Hi

Try this:

function newXMLHttpRequest()
{
var xmlreq = false;
if (window.XMLHttpRequest)
{
xmlreq = new XMLHttpRequest();
}else if (window.ActiveXObject)
{
try {
xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e1) {
try {
xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
}
}
}
return xmlreq;
}

Best Regards


hi Jin;

Thanks this source but not works, again return this error "Unknow runtime error",

however firefox in works. I dont understant. stupid problem.

No comments:

Post a Comment