Showing posts from March 17, 2012

Localizing an ASP.NET Application

Globalization is the process of designing and developing applications that function for multiple cultures, and localization is the process of customizing your application for a given culture and locale. The topics in this section describe how to create ASP.NET Web applications that can be adapted to different languages and cultures. Example for Localization:- Imports System.Threading.Thread Imports System.Threading Public Class Globalization     Public Sub New()         ' Creating a Global Culture specific to our application.         Dim cultureInfo As New System.Globalization.CultureInfo("en-US")         ' Creating the DateTime Information specific to our application.         Dim dateTimeInfo As New System.Globalization.DateTimeFormatInfo()         ' Defining various date and time formats.         dateTimeInfo.DateSeparator = "/"         dateTimeInfo.LongDatePattern = "MM/dd/yyyy"         dateTimeInfo.ShortDatePattern = "MM/dd/yyyy"

Some Expression Web 4 Add-Ins

Here are some Expression Web add-ins you can use: Insert Bing Map Add-in   by Mike Calvo ( read his overview  of this add-in) SlapShot for Expression Web 4 v1.1  by JD_MSFT Right Mouse Click prevention    by JD_MSFT Payment Buttons for PayPal   by WebAssist Search for Bing  by WebAssist Horizontal Menu Advancer for Expression Web 4   by CSSMenuTools Accordion Menu Advancer for Expression Web 4   by CSSMenuTools LightBox Advancer for Expression Web 4   by CSSMenuTools Extensibility Tester Add-In Expression Web 4 Add-Ins by fellow MVP  Ian Haynes Copyright Notice Add-In for Expression Web V4 Code Comment Add-In for Expression Web 4 Sub/Sup Text Add-in for Expression Web 4 'Close All' Add-In for Expression Web V4 Other Add-Ins Pure CSS Drop Down Menu Add-in  by  Ajatix Advanced CSS Drop Down Menu  by  Ajatix Vertical Menu Advancer for Expression Web   by CSSMenuTools

Highlighting the current date in AJAX CALENDER CONTROL

Add the following script to your aspx page function CurrentDateShowing(e)      {                 if (!e.get_selectedDate() || !e.get_element().value)         e._selectedDate = (new Date()).getDateOnly();      }    and set the property OnClientShowing="CurrentDateShowing". Example:                  

Custom Error Pages In ASP.NET

* Errors And Exceptions In ASP.NET - covers different kinds of errors, try-catch blocks, introduces Exception object, throwing an exception and page_error procedure. * Application Level Error Handling in ASP.NET - goes a level higher and explains handling of unhandled errors by using Application_Error procedure in Global.asax file, using of custom Http modules, sending notification e-mail to administrator, show different error pages based on roles and logging errors to text files, database or EventLog. This tutorial deals with user experience when error occurs. When error is occurred on ASP.NET web application, user will get default error page (which is not so nice looking, also known as "Yellow screen of death"). This error page confuses average visitor who don't know the meaning of "Runtime Error". Although developers like to know many details about an error, it is better to show more friendly error page to your users.           Web.config file

Add JavaScript programmatically using RegisterStartupScript during an Asynchronous postback

          The ClientScriptManager class contains various methods to add client scripts to a webpage using server side code. For example: you may need to add javascript programmatically to the page on a button click before posting back the page. One of the methods you can use is the  RegisterStartupScript() method of the ClientScriptManager class. However, this method does not work if the button control is wrapped inside an UpdatePanel. In this short article, we will explore how to add javascript programmatically using the ScriptManager.RegisterStartupScript, while performing an asynchronous postback. I also aim to cover some common mistakes developers make while using the ScriptManager class to add client scripts programmatically. We will study two scenarios in this article:  The first one, where we will use the ClientScript.RegisterStartupScript() to add script dynamically on a button click. We will add a label displaying the time, as well as change the color of the label

Ajax in

Ajax Overview :- ·           AJAX = Asynchronous JavaScript and XML. ·           AJAX is not a new programming language, but a new way to use existing standards. ·           AJAX is the art of exchanging data with a server, and update parts of a web page - without reloading the whole page. ·           AJAX is a technique for creating fast and dynamic web pages. ·           AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page. ·           Classic web pages, (which do not use AJAX) must reload the entire page if the content should change. Now let us see how this ajax is sending the request to the server and getting the response from the server AJAX is based on internet standards, and uses a combination of: XMLHttpRequest object (to exchange data asynchronously with a server) JavaScript/DOM (to displa