GeekArticles
Database
SQL Server
Database
SQL ServerAccessing Server-Side Data from Client Script (Part 1)
<p>
When building a web application, we must decide how and when the browser will communicate with the web server. The ASP.NET WebForms model greatly simplifies web development
by providing a straightforward mechanism for exchanging data between the browser and the server. With WebForms, each ASP.NET rendered output includes a
<code><form></code> element that performs a <i>postback</i> to the same page whenever a Button control within the form is clicked, or whenever the user modifies
a control whose <code>AutoPostBack</code> property is set to True. On postback, the server sends the entire contents of the web page back to the browser, which then
displays this new content. With WebForms we need to spend much time or effort thinking about how or when the browser will communicate with the server or how that
returned information will be processed by the browser. It just works.
</p><p>
While this approach certainly works and has its advantages, not without its drawbacks. The primary concern with postback forms is that they require a large amount
of information to be exchanged between the browser and the server. Specifically, the browser sends back all of its form fields (including hidden ones, like view state,
which may be quite large) and then the server sends back the entire contents of the web page. Granted, there are scenarios where this large quantity of data needs to
be exchanged, but in many cases we can use techniques that exchange much less information. However, these techniques necessitate spending more time and effort thinking
about how and when to have the browser communicate with the server and intelligently deciding on what information needs to be exchanged.
</p><p>
This article, the first in a multi-part series, examines different techniques for accessing server-side data from a browser using client-side script. Throughout this
series we will explore alternative ways to expose data on the server so that it can be accessed from the browser using script; we will also examine various tools
for communicating with the server from JavaScript, including jQuery and the ASP.NET AJAX library. Read on to learn more!
<br /><a More ></a></p>
Sponsored Links
Read Next: Accessing Server-Side Data from Client Script: Using WCF Services with jQuery and the ASP.NET Ajax
Related Topics
Subscribe via RSS
SQL Server
- Naming Database Objects: Part II
- Trace Messages Part V: Trace Cleanup
- Naming Database Objects: Part I
- Multiple-Child Aggregation
- Creating SQL Tables for an Integrating Application Using Dexterity
- SQL Server 2005 Beta 2 Transact-SQL Enhancements
- .NET Rocks! - Brian Larson on SQL Server Reporting Services
- Computing the Trimmed Mean in SQL
- SQL Server 2000 Gains on Oracle
- Separator First Formatting (SFF)
