Code Your Way to ASP.NET Excellence
|
Entry Date: Feb 2008
|
site: MSDN Magazine
|
Rating:
|
keywords:ASP .net; AJAX ASP .net; Performance; .net framework 2.0; Java Script; HTML; DHTML; DOM;
|
Article Description:
One of the selling points of the Microsoft® .NET Framework is that it makes programming easier—not just Web programming, but application programming in general. Few would argue that it doesn't live up to the hype. The .NET Framework Class Library (FCL), which provides the API that managed applications write to, is so rich and diverse that tasks requiring hundreds of lines of code in unmanaged applications are often accomplished with just one or two lines of managed code. If you don't believe it, compare a Windows®-based app that displays a JPEG with one that does the same using the .NET Framework (see http://samples.gotdotnet.com/quickstart/ winforms/doc/WinformsGDIPlus.aspx).
With such a rich class library to fall back on, you might be misled into believing that the .NET Framework presents fewer opportunities for clever coders to do great things. On the contrary, the sheer size of the .NET Framework means that nuggets of opportunity are everywhere. To illustrate, here are five little gems to help ASP.NET programmers code their way to programming excellence. They're from my personal grab bag of favorite ASP.NET programming tricks. I think you'll find them as useful as I do.
|
Comments:
The most interesting part of this article is how to make an image "live / refresh" without having to perform a full postback.
Imagine that you have chart bar (displayed as a fixed image, dynamically generated on the server side), and you let the user modify values using textboxes, you can just pickup the values of this boxes and using DOM/DHTML/Javascript change the URL of the image to a new one where you specify the new parameter values. You can do that implementing on the server side a custom HTTP Handler.
Very interesting, approach, it would help you to add AJAX like style to your site, without having to put lot of effort on it.
|
Click Here To Navigate to the Article
|
Asynchronous .NET "Fire and Forget" Pattern
|
Entry Date: Feb 2008
|
site: Eggheadcafe
|
Rating:
|
keywords:ASP .net; AJAX ASP .net;
|
Article Description:
Enter the Asynchronous Fire and Forget pattern! Faster than a speeding bullet, it will enable you to kick off a process or a method, never having to wait for anything, and sail on your merry way through your other stuff like a breeze. Hey, I don't have 30 milliseconds to wait for my SQL Insert call to complete! Time is just that tight. I need to Fire it off and keep galloping on!
|
Comments:
Sometime you need for instance to serve a web page and do some lenghty operations that have nothing to do with the ASPX page that you want to display (insert, write to the log, ...), with this pattern you can just start that thread and perform all that batch load work without impacting on the time response of your site / page.
If you combine this approach with AJAX script services or partial rendering, you can do cool things like, lazy loading of some parts of a page (you could have some tabs, let's the server loading the data for that tab(lenghty operation), and once the user clicks on it request the data to the server (if we are lucky we would get that data already processed, no wait time for the final user).
|
Click Here To Navigate to the Article
|
Silverlight + ASP.NET AJAX = Good Times
|
Entry Date: Jan 2008
|
site: Ado Guy
|
Rating:
|
keywords:ASP .net; AJAX ASP .net; Silverlight; Java Script; HTML; Web Design; DHTML; XAML;
|
Article Description:
I've been digging into the AJAX-Silverlight story a little more. I wanted an example of something more business-like than what I have already crafted (the updating clock is an interesting demo but not very practical) so I decided to try and do a simple updating line graph. This post is assuming you know a bit about ASP.NET AJAX and won't detail every step I took in creating the application (e.g. like creating the ScriptManager).(...)
|
Comments:
Who told you that Silverlight 1.0 is just a nice video player? ...
This article explains you how to create a cool chart using Silverlight 1.0 and integrate it in your existing ASP .net application.
You can use this in production now, ... of course implementing this on silverlight 1.1 / 2.0 would be quite easier, but now this version is on alfa, just for fun, a good excerse is to port this code from 1.0 to 1.1 (javascript to C#).
|
Click Here To Navigate to the Article
|
RegisterPostBackControl Method (control)
|
Entry Date: Jan 2008
|
site: ASP.net
|
Rating:
|
keywords:ASP .net; AJAX ASP .net; .net framework 3.0; UpdatePanel; Partial Rendering; ScriptManager;
|
Article Description:
Registers a control for postback. This method is used for postback controls inside an UpdatePanel control that would otherwise perform asynchronous postbacks.
|
Comments:
This method is not very well know, but quite useful for scenarios where you need perform a full postback on a button that is inside of an UpdatePanel
You don't have to fight anymore to fit outside from the UpdatePanel that full postback button, and you can activate just by adding one line of code in your codebehind.
|
Click Here To Navigate to the Article
|
How Do I: Use the Conditional UpdateMode of the UpdatePanel?
|
Entry Date: Jan 2008
|
site: ASP.net
|
Rating:
|
keywords:ASP .net; AJAX ASP .net; Performance; .net framework 2.0; UpdatePanel; Partial Rendering; ScriptManager;
|
Article Description:
The ASP.NET AJAX UpdatePanel includes an UpdateMode property that may be set to ‘Always’ or ‘Conditional’. The default is Always, in which case the UpdatePanel will always update its content during an asychronous postback. In this video we learn how we can set the UpdateMode to Conditional, in which case the UpdatePanel will only update its content when our server-side code calls its Update method. This allows you to use conditional logic in your C# or Visual Basic code to determine whether the UpdatePanel will update its content during the current asynchronous postback.
|
Comments:
When you start developing using AJAX ASP .net, on your localhost... everything works magically with good performance, AJAX is quite easy isn't it? Why the people go for more complicated stuff like script services? Just drop a bunch of UpdatePanels and everythings works fine no need to go for more complex code... well that's only true on your localhost :-), once you publish your site on your remote server things change...
By default UpdatePanels get all updated in every request, you can modify this behaviour by setting the UpdateMode to Conditional and you set in your sever side code which update panel gets updated (by doing this you can reduce the size of the response sent to the client).
|
Click Here To Navigate to the Article
|
[Alpha] Kind of a TextBox using TEXTBLOCK in Silverlight 1.1
|
Entry Date: Dec 2007
|
site: Blogs MSDN
|
Rating:
|
keywords:AJAX ASP .net; Silverlight; Java Script; HTML; VS 2008; .net framework 3.5; Visual Studio 2008;
|
Article Description:
Current version of Silverlight doesn't provide us with all the controls we require. We have only TEXTBLOCK, which makes our job slightly difficult when we try to type something. TEXTBLOCK does exposes Keyboard event handlers like KeyDown and KeyUp. Using these event handlers we can input text into our TEXTBLOCK.
|
Comments:
Is expected that RTM or even Beta versions of Silverlight 1.1 (well now changed the name to 2.0) will have already implemented standard controls like Textboxes, dropdownlists /combos...
Right now you can only play with a textblock, a pain in the neck to make it editable (trap keys and simulate edition). Maybe the best can be to perform this funcionallity on the HTML / javascript side (e.g. modal popup dialog) and then pass it back to the silverlight canvas, but... if you need online editing right now this trick can be useful.
|
Click Here To Navigate to the Article
|
Silverlight 1.1 Quickstarts
|
Entry Date: Dec 2007
|
site: Silverlight
|
Rating:
|
keywords:AJAX ASP .net; WCF; XML; Silverlight; Java Script; HTML; VS 2008; Visual Studio 2008;
|
Article Description:
The following QuickStart topics demonstrate how to create managed Silverlight-based applications using C# and Visual Basic. This content pertains to the Microsoft Silverlight 1.1 Alpha release.
|
Comments:
Silverlight 1.1 it's a revolution... everybody wants to develop applications using this technology, but... Where to start? No books, just alpha stuff...
In this URL you will find a bunch of great tutorials that will let you have a silverlight 1.1 crashcourse.
|
Click Here To Navigate to the Article
|
Managing the User Experience in AJAX
|
Entry Date: Nov 2007
|
site: MSDN Magazine
|
Rating:
|
keywords:ASP .net; AJAX ASP .net; Java Script; HTML; DHTML; UpdatePanel; Partial Rendering; ScriptManager;
|
Article Description:
We are all used to the stop-and-go nature of the Web. For every request you make by clicking a button or a link, the browser places a request and waits for the response.
An AJAX application has the power to place Web requests directly from script code, bypassing the browser. When you use the browser to request a page—for example, through a standard Submit button or hyperlink—just one request is processed at a time for each active browser window. Requesting a page via script doesn't have this limitation and multiple requests can take place concurrently. In the July 2007 installment of Cutting Edge, I took advantage of this feature to implement a live progress bar that reports to the client the real progress made by a server-side running task. The possibility of placing concurrent calls from a single browser window opens up a whole new world of possibilities for addressing various issues—including many related to the UI.
|
Comments:
Script services let's you send several request in parallel... that's quite powerfull, but it can get complex to perform validations on your page
UpdatePanels have a main drawback... only one request can be travelling from client to server, if you send another one in paralell the previous one will be canceled (do not forget you are sending ViewState, and PageRequest Manager is a singleton...).
In this article Dino points out a simple solution: disable the whole UI meanwhile the page is being updated (DIV solution), and how to play with updatepanel request that have a higher priority that one that going to be executed.
|
Click Here To Navigate to the Article
|
How Do I: Add ASP.NET AJAX Features to an Existing Web Application?
|
Entry Date: Nov 2007
|
site: ASP.net
|
Rating:
|
keywords:ASP .net; AJAX ASP .net; .net framework 2.0;
|
Article Description:
Learn how easily you add Microsoft ASP.NET AJAX functionality to an existing ASP.NET application. This video shows that there is no need to change your server controls or data access code — just add and configure a few ASP.NET AJAX controls. Simple!
|
Comments:
If you have troubles to add AJAX support to your old web application, this webcast/video will tell you how to do that step by step.
Perfect dummy guide :-).
|
Click Here To Navigate to the Article
|
Adding ASP.Net AJAX to existing websites
|
Entry Date: Nov 2007
|
site: Blogs MSDN
|
Rating:
|
keywords:ASP .net; AJAX ASP .net; .net framework 2.0;
|
Article Description:
If you want to add Microsoft ASP.Net AJAX (v1.0 RTM) to an existing website assuming you've installed the RTM edition you can do it by adding some stuff to the web.config file:
|
Comments:
When you install AJAX ASP .net you get a nice new project template called new AJAX Web Application or something like, that's cool to start a new project, but...
What if you want to add AJAX support to your old good web application ? This article explains you how to do all the needed tweaking to upgrade your plain vanilla ASP .net 2.0 app and configure to support the full fancy AJAX technology
|
Click Here To Navigate to the Article
|
How to enable session state in web services
|
Entry Date: Nov 2007
|
site: anubhavg blog
|
Rating:
|
keywords:ASP .net; AJAX ASP .net; XML; Java Script; JSON; Web Services;
|
Article Description:
Some days back I was writing a few web services. I have coded web services many times, but never required to use Session State before. This time I required to check a few session variables before returning the correct data from the web service. I tried using the HttpSession like in a normal web page but got an error. After a little search found the right way to use HttpSession in webmethods.
|
Comments:
Web services are stateless and use SOAP and XML... Ehhh ummm ??? NOT ALWAYS
In AJAX Web applications, most of the times web services and page methods are just "private" for a given page or web application, taking this into consideration we have that:
-
--> SOAP is to heavy for HTTP traffic (we use AJAX to sky rocket performance and have minimum weight on our roundtrips to the server) and complex to handle using Javascript, it's better to serialize using JSON.
-
--> Webservices interacting with your web application will require most of the time to use the session web application object (security, values in session...) so no stateless for your web services. You could try to use WSE and... but things get quite complicated.
This article explains you how to enable session state for a given web method of your webservice, quite easy (just one line of code) and quite useful
|
Click Here To Navigate to the Article
|