Monthly Archives: December 2009

Redirecting the aspx file from Silverlight

Code for redirecting the ASPX file from Silverlight is as below

string url = “”;
HtmlPage.Window.Navigate(new Uri(url, UriKind.Absolute), “_blank”);



HtmlPage.Window.Navigate(new Uri(“ “));


HtmlPage.Window.Eval(““”, ‘_self)”);



How to redirect the XAML file in silverlight

Here is the code to redirect with in silverlight(XAML) file .

public static void Navigate(UserControl newPage)        {

            UserControl oldPage = root.Children[0] as UserControl;




Add the above method in App.xaml file . Then modify the Application_Startup method as below code.

private void Application_Startup(object sender, StartupEventArgs e)        {

            root = new Grid();

            root.Children.Add(new MainPage());

            this.RootVisual =root;


Then you can add the below code line in the page as want for example you can put it inside the button click event

App.Navigate(new MarketCenter());


Updates in Asp.Net Ajax

1) AJAX Control Toolkit — May 2009 Release


2) Microsoft AJAX Library 3.5

3) ASP.NET AJAX Preview 4.0

4) AJAX Videos

5) AJAX Control Toolkit Videos

6) AJAX Tutorials

7) AJAX Control Toolkit Tutorials

8) ASP.NET 3.5 Documentation

9) ASP.NET AJAX 1.0 Documentation and Migration Guides

10) ASP.NET AJAX Forums

Error handling in an AJAX

Error handling in an AJAX world can often be tricky — especially when AJAX call-backs are taking place and a mixture of client and server code is running within an application. In its most recent release, the control that comes with ASP.NET AJAX now has much more robust error handling and reporting features for you to use. Specifically:

1) You can now handle the “OnAsyncPostBackError” event on the control to catch and/or modify an error message that occurs during the processing of an AJAX postback callback on the server.
2) You can now set the “AllowCustomErrors” property on the control to enable the standard ASP.NET custom error support to be enabled to redirect a user automatically to an error page when an error occurs (even if it is happening during an AJAX postback).
3) You can now optionally handle client-side JavaScript events on the page to intercept any error message sent back from the server, and perform custom client-side actions as a result (for example: to output the error message to a nicely formatted <!–

–>section instead of performing a pop-up message).


In the VS2008 Microsoft include basic and frequently used AJAX server extender in its toolbox under AJAX Extensions tab. It contains both Server side and Client Side code to give Ajax like behaviors.

The server control they included are
1) Script Manager
2) Scrip Manager Proxy
3) Update Panel
4) Update Progress
5) Timer

Script manager must be included before any Ajax Server control or any AJAX client script are include (ie) Partial-page rendering, which enables regions on the page to be independently refreshed without a post back. It manages AJAX Extensions script libraries and script files, partial-page rendering, and client proxy class generation for Web and application services.

In some situation you have to use more than one Script manager, but per page you can use only one Script Manager at that time you can use Script Manage Proxy.

By using Asp.Net update panel we can update only that particular region instead of refreshing the entire page. This is referred to as performing a partial-page update.

The UpdateProgress control enables you to provide feedback about the progress of partial-page rendering.

The Timer control is to postbacks the page at defined intervals. If we use the Timer control with an UpdatePanel control, we can enable partial-page updates at a defined interval.

Keep Enjoy!

Basic of AJAX

Introduction to AJAX

AJAX – Asynchronous JavaScript and XML, is used in webdevelopment to enrich the web application. Before ajax the web page has to interact with the server and load the entire page newly each time when the page get loaded. But AJAX interact with the server and load the data in the particular region of the page using javascript. So the page is not get refreshed each time, so user can feel just like the windows application.

Ajax has internet standareds

1) JavaScript

2) XML


4) CSS

 XMLHttpRequest object

 XMLHttpRequest is an important part of the AJAX web development technique, and it is used by many websites to implement responsive and dynamic web applications. Ajax uses XMLHttpRequest object to interact with the server by sending request to server and receiving response from the server and update the region, this request and response is take place at the background


In the VS2008 now the AJAX is get included with the .NET Framework3.5, so there is no need to download the separately for ajax. Apart from the Ajax basics control there are several AJAX server extender control is also available you can make use of it for easy programming. To download the Ajax Control Toolkit click here

How to Download Ajax control Toolkit for framework3.5

1) After download the zip file from the above link. Just extract the zip file In a separate folder .

2) Create a separate tab in Toolbox for AJAX Toolkid

3) Right click inside the Tab control choose the browse button then select the path where you extract the Toolkit. Inside that Select SampleWebsite => bi n=> insid that select the AjaxControlToolkit.dll. click ok Now the Extender control is ready for use.

 Keep Enjoy !

%d bloggers like this: