.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Asad Ali
Fauzul Azmi
Post New Web Links

URGENT: HElp with AJAx Xmlhttp calls

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :ASP.Net
 

I have a client js script which calls server aspx pages 

Both are on same domain ctually localhost.

but when I do a XMLHTTPREQUEST I get 500 Internal error, service not available.

If I run both application under debug mode then all works fine.

But when I publish and run, it does not work.





View Complete Post


More Related Resource Links

Using JQuery to perform Ajax calls in ASP.NET MVC

  
The muscle behind the actual asynchronous calls comes from JavaScript. I looked around at a bunch of existing JavaScript libraries and settled on JQuery because of the way it leverages existing CSS knowledge. The three things that the library should do easily are:

Extreme ASP.NET: Client-Side Web Service Calls with AJAX Extensions

  

Microsoft AJAX Library and the ASP.NET 2.0 AJAX Extensions provide a number of compelling features ranging from client-side data binding, to DHTML animations and behaviors. Learn all about them here.

Fritz Onion

MSDN Magazine January 2007


Securing AJAX Calls from JQuery (Looking for ideas, suggestions, best practices).

  

Hello,

I am working on web application in which all of the data I am submitting back to the server is being done on the client side using JQuery AJAX calls to my .NET web services using JSON.  This works perfectly to enhance my user experience and greatly reduces post backs, etc.

What I am looking for suggestions on is securing the web services being exposed to the client side from being used by anything but my JQuery code on my site.  The security hole that I see here is that since the client-side JQuery can access the web services, so could anything.

Any ideas?  What is the best practice here?

Thanks


Updation in gridview using Ajax XmlHttp Object does't work

  

Hello,

I have many divs in 1 page and each div consists of a gridview, the gridview is loaded by making AJax calls.

On load of the page, all the grid load data properly.

But now when i update any row in either of the grids, and make a call to the javascript that loads the grid in the page, it doesn't work rightly.

Any advices. Am i doing something wrong.

Wat are the options to update/refresh the grid.

Thanks.



ReportViewer looping ajax calls to keep session alive causes Firefox to look like it's constantly r

  
In the HTML generated by the ReportViewer there is the following line of code (I've tried ot make it more readable by removing the superfluous information)
setTimeout("frames['ReportViewer1TouchSession0'].location.replace('/Reserved.ReportViewerWebControl.axd?...&TimerMethod=KeepAliveMethodReportViewer1TouchSession0...", 0);

function KeepAliveMethodReportViewer1TouchSession0() {
   setTimeout("frames['ReportViewer1TouchSession0'].location.replace('/Reserved.ReportViewerWebControl.axd?...TimerMethod=KeepAliveMethodReportViewer1TouchSession0....", -1703027296);
}

 

When the Reserved.ReportViewerWebControl.axd is called it makes a GET request that returns the following HTML:

 

<html><body><script type="text/javascript">parent.KeepAliveMethodReportViewer1TouchSession0();</script
></body></html>
 

 So in effect it becomes a recursive function and because KeepAliveMethodReportViewer1TouchSession0 calls a set timeout with a negative timeout value, in Firefox it's called immediately, in about 10 secon

session timeout redirect in ajax calls

  

If a normal session timeout occurs we could handle the session timeout.

But say we are using a lot of ajax calls, webhandlers etc. How would we catch session timeout here and redirect to error/login page.

Thanks



Multiple AJAX calls in JQuery

  

I am trying to make 2 separate AJAX calls using buttons. What I want to happen is: when Button1 is clicked ProductsTable shows data from the webservice; when Button2 is clicked OthersTable shows its own data from the webservice. But right now, when either button is clicked, nothing shows up. I know the code works if there's only one of them and it's not wrapped around a .click function.

No error messages. ASP.NET 4.0, JQuery 1.4.4. Not using ScriptManager. Not using UpdatePanels.

Code below:


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script src="Scripts/jquery-1.4.4.js" type="text/javascript"></script>
    <script src="Scripts/jquery.tmpl.js" type="text/javascript"></script>
    <script id="ProductsTemplate" type="text/x-query-tmpl">
        <table id="ProductsTemplate">            
            <thead>
            </th

Urgent Need help Ajax Page Loading Problem

  

Hello there...!

I am using .net framework 3.5 in my project.. and  I have used update panel in each page. And For Loading Progess bar I have used following code

    <script type="text/javascript">

        Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);

        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler)

        function BeginRequestHandler(sender, args) {
            var modalDialog = $find('<%= mpp.ClientID %>');
            if (modalDialog != null) {
                modalDialog.show();
            }

        }

        function EndRequestHandler(sender, args) {

            var modalDialog = $find('<%= mpp.ClientID %>');
            // get reference to modal popup using the AJAX api $find() function

            if (modalDialog != null) {
                modalDialog.hide();
            }

        }

    </script>

    <asp:LinkButton ID="LinkButton1" runat="server" Style="display: none;" Text="" />
    <asp:ModalPopupExtender ID="mpp" runat="server" TargetControlID="LinkButton1" PopupControlID="panLoading"
        CancelControlID="CancelButton" BackgroundCssClass="modalBackground" />
    <

ReportViewer looping ajax calls to keep session alive causes Firefox to look like it's constantly r

  
In the HTML generated by the ReportViewer there is the following line of code (I've tried ot make it more readable by removing the superfluous information)
setTimeout("frames['ReportViewer1TouchSession0'].location.replace('/Reserved.ReportViewerWebControl.axd?...&TimerMethod=KeepAliveMethodReportViewer1TouchSession0...", 0);

function KeepAliveMethodReportViewer1TouchSession0() {
   setTimeout("frames['ReportViewer1TouchSession0'].location.replace('/Reserved.ReportViewerWebControl.axd?...TimerMethod=KeepAliveMethodReportViewer1TouchSession0....", -1703027296);
}

 

When the Reserved.ReportViewerWebControl.axd is called it makes a GET request that returns the following HTML:

 

<html><body><script type="text/javascript">parent.KeepAliveMethodReportViewer1TouchSession0();</script
></body></html>
 

 So in effect it becomes a recursive function and because KeepAliveMethodReportViewer1TouchSession0 calls a set timeout with a negative timeout value, in Firefox it's called immediately, in about 10 seconds Firebug logs over 150 GET requests in one minute there

Microsoft AJAX CDN

  
Content delivery networks (CDNs) are composed of "edge cache" servers that are strategically placed around the world at key Internet network points. These "edge cache" servers can be used to cache and deliver all types of content - including images, videos, CSS and JavaScript files.

Using a CDN can significantly improve a website's end-user performance, since it enables browsers to more quickly retrieve and download content. For example, instead of having a browser request for an image traverse all the way across the Internet to your web server to download, a CDN can instead serve the request directly from a nearby "edge cache" server that might only be a single network hop away from your customer (making it return much faster - which makes your pages load quicker).

AJAX GridView Checkbox Select All in ASP.Net

  
In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net

AJAX GridView Paging and Sorting using C# in ASP.Net

  
To enable the GridView Paging and Sorting to update the GridView Data without refreshing the ASP.Net web page AJAX Extension controls are used. UpdatePanel is used to hold the GridView control that triggers the events for the controls placed inside it. By Default UpdatePanel triggers the asynchronous postbacks for its child controls.

GridView Paging Using Ajax in ASP.Net

  
To enable the GridView Paging and Sorting to update the GridView Data without refreshing the ASP.Net web page AJAX Extension controls are used. UpdatePanel is used to hold the GridView control that triggers the events for the controls placed inside it. By Default UpdatePanel triggers the asynchronous postbacks for its child controls.

jQuery $(document).ready() and ASP.NET Ajax asynchronous postback

  
Many call it the ASP.NET jQuery postback problem, but using the technique below should make it no problem anymore. $(document).ready() isn't called after an asynchronous postback. What this means? You lose the functionality that should be executed within $(document).ready() after an UpdatePanel rendered its contents after an asynchronous postback.

Making Ajax Callbacks to the Server Using jQuery with ASP.NET

  
In the first part of this article series I introduced jQuery's functionality and how it provides a rich client side programming model. This time around I'll expand on these concepts and show you how you can use jQuery in combination with ASP.NET using it as an AJAX backend to retrieve data. I'll also discuss how you can create ASP.NET controls and otherwise interact with jQuery content from ASP.NET pages in WebForms.


jQuery is just a JavaScript library so it will work seamlessly with ASP.NET both from page code as well as through backend driven code using the Page.ClientScript object or ScriptManager. You can use jQuery on its own as a client side and Ajax library that communicates with ASP.NET or you can use jQuery in combination with ASP.NET AJAX. The two actually complement each other quite well as jQuery provides functionality that the ASP.NET AJAX library does not and vice versa. For the most part the interaction between the two libraries is trouble free except for a few very rare edge cases.

Building a grouping Grid with GridView and ASP.NET AJAX toolkit CollapsiblePanel

  
I've posted an update to this post to apply on demand loading of Details data using ASP.NET AJAX PageMethods. I'm demonstrating the usage if CollapsiblePanelExtender client events on the new post. Check it out.

I admit, Matt Berseth is really inspiring me! Few days ago I pass through 2 of his great posts:

.Surrounding your Data Table and Dialog Controls with ComponentArt Styled Panels
.Building a Grouping Grid with the ASP.NET 3.5 LinqDataSource and ListView Controls
The first one is pure design tips one which I used for making good presentation of my demo here. The 2nd post is actually the idea.

Using jQuery to directly call ASP.NET AJAX page methods

  
Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend