K
Kuldeep
Framework: Visual Studio 2005
Technology: ASP.NET 2.0
Language: C#.NET 2.0
I have been using basic AJAX in my applications for quite some time now.
The pseudo code is a as follows:
<script type="text/javascript">
var xmlHttp;
function createXMLHttpRequest()
{
if (window.ActiveXObject)
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest)
{
xmlHttp = new XMLHttpRequest();
}
}
function startRequest()
{
var ProvinceID=document.getElementById("DropDownList1");
createXMLHttpRequest();
xmlHttp.onreadystatechange = handleStateChange;
xmlHttp.open("GET", "?ProvinceID="+ProvinceID.value, true);
xmlHttp.send(null);
}
function handleStateChange()
{
if(xmlHttp.readyState == 4)
{
if(xmlHttp.status == 200)
{
div1.innerHTML=xmlHttp.responseText;
}
}
}
</script>
Nothing wrong with the implementations so far but I need some clarifications
on using AJAX
1. Is there any constraint on the Server or Cache while using this method
(xmlHttp = new ActiveXObject("Microsoft.XMLHTTP") or
div1.innerHTML=xmlHttp.responseText )
2. Are there any other precautions to be taken while using AJAX in our
application
3. Let us consider a scenario.
I have a requirement which has an UltraChart to be populated based on the
data fetched through a DataSet.
Now, conventionally, there would be a postback once i click the button "Plot
Graph" which populates the UltraChart and displays the Graph.
My question: How do I achieve the above mentioned result without having a
Postback using AJAX?
4. If there are any good links on AJAX with ASP.NET 2.0 please share it with
me
Thanks,
Kuldeep
Technology: ASP.NET 2.0
Language: C#.NET 2.0
I have been using basic AJAX in my applications for quite some time now.
The pseudo code is a as follows:
<script type="text/javascript">
var xmlHttp;
function createXMLHttpRequest()
{
if (window.ActiveXObject)
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest)
{
xmlHttp = new XMLHttpRequest();
}
}
function startRequest()
{
var ProvinceID=document.getElementById("DropDownList1");
createXMLHttpRequest();
xmlHttp.onreadystatechange = handleStateChange;
xmlHttp.open("GET", "?ProvinceID="+ProvinceID.value, true);
xmlHttp.send(null);
}
function handleStateChange()
{
if(xmlHttp.readyState == 4)
{
if(xmlHttp.status == 200)
{
div1.innerHTML=xmlHttp.responseText;
}
}
}
</script>
Nothing wrong with the implementations so far but I need some clarifications
on using AJAX
1. Is there any constraint on the Server or Cache while using this method
(xmlHttp = new ActiveXObject("Microsoft.XMLHTTP") or
div1.innerHTML=xmlHttp.responseText )
2. Are there any other precautions to be taken while using AJAX in our
application
3. Let us consider a scenario.
I have a requirement which has an UltraChart to be populated based on the
data fetched through a DataSet.
Now, conventionally, there would be a postback once i click the button "Plot
Graph" which populates the UltraChart and displays the Graph.
My question: How do I achieve the above mentioned result without having a
Postback using AJAX?
4. If there are any good links on AJAX with ASP.NET 2.0 please share it with
me
Thanks,
Kuldeep