I've some knowledge in the Web development so far. I've been working with ASP.Net, CSS, JS and a little of the AJAX Control Toolkit. Since, the AJAX Toolkit needs to be install on the machine where the page is running, I have a few problems on that becuase
in my job to do that we have to ask for the permisions to install it on the different enviroments: UAT & PROD.
So, I came up with the idea to use AJAX but manually. I mean, without the AJAX Control Toolkit. However, doing the development in that way I'm almost new :-(.
So far, I've implementing a little test using javascript functions to implement AJAX and all is working OK before I call the function who send the string to be process by the server. I'm getting the
following status in my reques: 12029
(aparentely the issue is the internet connection).
Does anyone know what would be the problem and how would be the best way to solve it?
I would like to ask the following as well:
I'm using the same ASP.net page (AjaxTest.aspx) to present the UI and to send the string by javascript.
So, Is this the best way to do that?
Please, any help or clue would be very helpful.
Thanks in advance
Hi, if want to simulate what happens if the user connection drops and wants show a proper message, in that case hook the endRequest of PageRequestManager:
function EndRequestHandler(sender, args)
{
if (args.get_error() != undefined)
{
if ((args.get_response().get_statusCode() == '12029'))
{
//Show a Message like 'Please make sure you are connected to internet';
}
}
}
Chetan Sarode
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Lesthad_mk
Member
96 Points
159 Posts
Problem implementing AJAX with ASP.NET manually
Nov 30, 2012 06:34 PM|LINK
Hi all
I've some knowledge in the Web development so far. I've been working with ASP.Net, CSS, JS and a little of the AJAX Control Toolkit. Since, the AJAX Toolkit needs to be install on the machine where the page is running, I have a few problems on that becuase in my job to do that we have to ask for the permisions to install it on the different enviroments: UAT & PROD.
So, I came up with the idea to use AJAX but manually. I mean, without the AJAX Control Toolkit. However, doing the development in that way I'm almost new :-(.
So far, I've implementing a little test using javascript functions to implement AJAX and all is working OK before I call the function who send the string to be process by the server. I'm getting the following status in my reques: 12029 (aparentely the issue is the internet connection).
Does anyone know what would be the problem and how would be the best way to solve it?
I would like to ask the following as well:
I'm using the same ASP.net page (AjaxTest.aspx) to present the UI and to send the string by javascript.
So, Is this the best way to do that?
Please, any help or clue would be very helpful.
Thanks in advance
Regards!
DarthSwian
Star
12771 Points
2361 Posts
Re: Problem implementing AJAX with ASP.NET manually
Nov 30, 2012 06:39 PM|LINK
You don't need the ajax toolkit to do ajax. Some things make it easier. I've found that jquery is very good for doing ajax functions. Take a look....
http://api.jquery.com/jQuery.ajax/
Seek and ye shall find or http://lmgtfy.com/
chetan.sarod...
All-Star
65819 Points
11163 Posts
Re: Problem implementing AJAX with ASP.NET manually
Dec 03, 2012 02:26 AM|LINK
12029 ERROR_INTERNET_CANNOT_CONNECT The attempt to connect to the server failed.
http://support.microsoft.com/kb/193625
Hi, if want to simulate what happens if the user connection drops and wants show a proper message, in that case hook the endRequest of PageRequestManager:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args) { if (args.get_error() != undefined) { if ((args.get_response().get_statusCode() == '12029')) { //Show a Message like 'Please make sure you are connected to internet'; } } }Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
CruzerB
Contributor
5399 Points
1098 Posts
Re: Problem implementing AJAX with ASP.NET manually
Dec 03, 2012 08:07 AM|LINK
Hi,
Maybe you can look into this article. It show a simple way to do callback(Ajax) at ASP.NET.
http://www.codeproject.com/Articles/27172/The-ICallbackEventHandler
My Technical Blog
Lesthad_mk
Member
96 Points
159 Posts
Re: Problem implementing AJAX with ASP.NET manually
Dec 03, 2012 07:07 PM|LINK
Hi All
First of all, thanks so much for your comments. I didn´t want to write something on the post before not trying what you wrote. I've solve the problem looking in the following article: http://blogs.cametoofar.com/post/raw-or-plain-ajax-in-aspnet-using-javascript.aspx
It gave me a clue of what was wrong in my code and how to achieve the expected result combining ASP.Net + AJAX + Javascript.
I will working in my project with Javascript so far due to some restrictions on the server :-(. However, I will trying the same with JQuery on my own.
I hope this help ohter who are starting using these technologies/techniques (AJAX).
See you soon around here ;-)
Regards!