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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Looking for guidance: wanting to work with AJAX architecture

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


I'm starting a small website that will be backed by a database, and will allow a small number of users to authenticate and select an entry in the database, and then view (and optionally update) a corresponding entry (think master-detail).

I have some flexibility in how I'll do this, but I'd really like to incorperate some newer AJAX style coding, eliminating some page postbacks. I think this is a great opportunity to learn the concepts well.

I'll probably go with an ASP.NET 4.0 site. From what I've seen there are MANY ways to go about this:

-WCF Data Services to expose the data, and consume in ASP.NET

-Page methods to expose the data, separate method to update the data

-I'd rather avoid the UpdatePanel because I'm really looking for a full hands-on approach, with learning client side scripting being an objective as well.

Beyond that, it seems that one can use jQuery to build clientside templates, but also one can use the ASP.NET AJAX template engine (in ASP.NET 4.0 I believe).

A concern I have: users should only be able to work with the data exposed via these endpoints if they are logged into the website. Hopefully I can somehow reuse the ASP.NET forms authentication cookie for this purpose. 

Well, I hope I've posted enough to a

View Complete Post

More Related Resource Links

Cutting Edge: AJAX application architecture, Part 2


The second of this two-part series delves into the script services programming model, which is useful if you're looking for a full paradigm shift in building AJAX applications.

Dino Esposito

MSDN Magazine October 2007

Cutting Edge: AJAX Application Architecture, Part 1


In the first of a two-part column, Dino explains AJAX from an architectural standpoint to help developers, architects, designers, and administrators better understand the issues that affect their sites.

Dino Esposito

MSDN Magazine September 2007

Ajax Asyncfileupload doesn't work as soon as I put it in a control


Hi guys,

I can't get my <ajax:asyncfileupload> working and I don't see why...

When outside any panel or table it is working well, but as soon as I put it in a <asp:panel> or table I get a strange error which seems to be on client-side but I don't understand what's happen here. Here is the code and code-behind and Javascript.

Here's the error: 


Here's my front-code:

<%@ Page Language="VB" MasterPageFile="~/masterpages/mpSqueletton.master" AutoEventWireup="false" CodeFile="frmAdmGestSocietes.aspx.vb" Inherits="adm_frmAdmGestSocietes" title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
<script type="text/javascript" language="javascript">    
        function uploadError(sender,args)
          document.getElementById("<%= lblStatus.ClientID %>").innerText = args.get_fileName(), "<span style='color:red;'>" + args.get_errorMes

Field validators does not work when field is manipulated with ajax

Hi.I have defined a field validator that works fine on normal behavior on a page:<asp:RequiredFieldValidator runat="server" ErrorMessage="errroooorr"  ControlToValidate="TextBoxHouseNumber" Display="Dynamic"></asp:RequiredFieldValidator>Now if I dont insert any text in the TextBoxHouseNumber field, and push submit, the FieldValidator fires as it should. But if I now click a button that automatically fills the TextBoxHouseNumber with text from a Jquery/Ajax function, the field validator still shows. It´s like "Hey, the user hasnt made any changes to the textbox, so I wont bother check it".How can I overcome this problem?Thanks alot! :)

AJAX SlideShowExtender doesn't work, but I don't know why.

I try to use an AJAX SlideShowExtender, but I can't get it to work.This is my default.aspx code:<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestConnectionString._Default" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <!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"> <title></title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:Panel ID="SlideShowPanel" runat="server"> <asp:SlideShowExtender ID="SlideShowExtender1" runat="server" TargetControlID="Image1" SlideShowServiceMethod="GetSlides" AutoPlay="True" Loop="True" PlayInterval="1000">

Sharepoint2007 + Ajax slow work

Hello, I write Sharepoint WebPart with jQuery plagin jqGrid to show DB data in table view on Sharepoint Server 2007 (of cource to manipulate with data jQuery plagin use Ajax technology). It works fine, but I have a very important trouble with productivity, it's unacceptable for my project. As I see the trouble is that Ajax work very slow on Sharepoint. For test I wrote ASP.NET project with the same code and same data, user can get and update data less than 1 second, the same action on Sharepoint takes over 12 seconds. IT'S UNACCEPTABLE!!! Does any body can help me? Any suggestions...

jquery ajax call does not work after adding routes

Hi.   I've added routes to my asp.net 4 website so that, for example the page: "~/Main/About/Careers.aspx"  is mapped to the url:  http://localhost/mysite/careers/   I'm using jquery to make an ajax call and it simply does not work after I've added the routing, I used the following code, and it remains stuck on the spinner image:$.ajax({ type: "POST", url: "Careers.aspx/SubmitApplication", data: "{" + paramList + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { $(".applySpinner").show() }, success: function (msg) { $(".applySpinner").hide(); // Replace the div's content with the page method's return. if (msg.d == "") { $(".applySuccess").hide(); $(".applyFailure").show(); return; } else $(".applyFailure").hide(); $(".sentTime").text(msg.d); $(".applySuccess").fadeIn(1000); } }); Thanks.  

Does AJAX 2.0 work with ASP.Net 2.0 or ASP.Net 3.5


I wanted to know if AJAX 2.0 version is compatible with ASP.Net 2.0 ?

Thanks in Advance

Updation in gridview using Ajax XmlHttp Object does't work



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.


EF4 with Repository and Unit of Work patterns - Question about an architecture


Hello All,

I've been reading recently about EF4, and how to build an architecture for asp.net web forms application using it.

I explored using POCOs (self tracking entities), with WCF, but found out that my application will be deployed on a single box (i.e. one tier), so I started reading about logical separation of layers, and came up with the following solution:

  1. DAL layer that contains EDMX model and EF APIs, and also generated context object.
  2. Entities DLL that holds all generated POCO entities using ADO.NET POCO entity generator. (for persistence ignorance, and decoupling entities from DAL).
  3. Business layer that contains a façade for each related group of business functions, the façade will be aware of and using DAL layer. And in each function, it will initiate context and uses different entities to carry out specific job (i.e. function).
  4. UI layer that only calls the business layer façade classes. With no awareness of DAL, but it will be aware of entities (i.e. using entities DLL), as the business layer will return results basically as entity collections.

I want to know what you think about this architecture.

I also read about an architecture that uses repository and unit of work patterns, but what I understand that context object is already implementing a UOF pattern, and also object sets

Ajax.BeginForm doen't work properly with AjaxOptions.OnSuccess


Hi All,

I want to use Ajax.BeginForm instead of Html.BeginForm.

I can use it with out OnSuccess option. When I include it, i doesn't save and give validaiton messages.

How can I solve this ?

Kind Regards


problem with ajax control while upgrading website from 3.5 to 4.0 frame work



i am working on asp.net website.

on my web page i  submit some data on click at button , this block is inside update panel.

this functionality working fine in 3.5 frame work.

Now  our website is using 4.0 frame work.

controls inside update panel giving following error on submting data :

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500.

 thanks in advance

SQL 2005 Express to work with C# in a distributed architecture


Hi, I am super new using SQL Srv 2005, I have been using for years Access 2003 and everyone is pointing me to better use SQL Server 2005 for many reasons. I haven't had any problem until now using Access2003 and I am using a distributed application developed in C# that basically uses the Access2003 file that is located in a shared folder in the LAN. However, I think it is worth to learn SQL Srv 2005 and more if there is a free version (Express).


I already have a deployed C# application that is using an MSAccess2003 that is located in a shared folder in the LAN (around 30 computers already have this application connected to the same LAN, of course), I am planning to install in the server the SQL Srv 2005 and use it.


Could I have more than one application connected to SQL Server 2005 Express edition at the same time? (<- since it is free, I have my questions about this scenario)




ASP.NET AJAX control does not work on Apache server


hi all, 

i am using mod_aspdotnet.so module to hosting my ASP.NET application. all was ok until i use ajax control tool kit in my aplication. 

I am using ajaxToolkit:CascadingDropDown to conect 2 dropdownlist in cascade. In IIS every thing works fine, but in apache there are some problems. When load the page, i got the next javascript error: 'Sys' undefined. 

the object signed are :

Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('MAIN_FORM'));


How can i solve this problem???

thx in advance!

Getting intellisense to work in VS 2010 for a ajax-enabled WCF Service


Hi all,

I'm experimenting with WCF services inside of a test project.  I have seen documentation on various blogs etc. that tell me that Intellisense is available for WCF services that I write.  However, I cannot get this intellisense to work in VS 2010.  I have tried the same simple steps in VS 2008 and can get intellisense working.

Has something changed here?  Is there a chance I am doing something wrong?

I create a new web application project.
I add an ajax-enabled WCF Service.
I add the script manager control to the page and then reference my wcf service.
When I go to create an object proxy to the service the intellisense is not available.
I know my code is working because I tested it.  It can call the web service and gets the expected result.  Just no intellisense.

I've also tried referencing intellisense from a separate .js file using the following technique:
/// <reference path="MicrosoftAjax.js" />
/// <reference path="MyService.svc" />

This has also not worked.  I have verified that my pathing information etc. is correct. 

Anyway, this is driving me nuts so I'm hoping somebody can shed some light on this.

Ajax.net does not work in windows 2008R2 or windows 7 64bit


Hi ,

I got this error for ajax website

ASP.NET Ajax client-side framework failed to load

. it works well in windows 2003 , 2008 and vista , but in windows 2008r2 and windows 7 , I get this error and ajax does not work.

Architecture Tools in VSTS 2010

Designing new functionality on existing applications can be daunting. There are always differences between the original design and the current implementation.

The new Architecture tools within Visual Studio Team System 2010 help you understand the application you have, design new functionality you need, and validate that your design and your implementation do not deviate.
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