Skip to main content

Posts

Showing posts from September, 2011

How to used Cultures of different language in ASP.net

We want develop a system in different languages. Naturally, all the content of these sites will be in the respective language. The content includes static text, form labels, prompts, error messages and similar things. In addition you would also like to take care of things such as date formats and number formats. Typically you will choose one of the following approaches to develop such web sites The culture can be set for a thread using Thread.CurrentThread.CurrentCulture property. using System.Threading.CurrentThread The culture can be set for a thread using Thread.CurrentThread.CurrentCulture property. System.Threading. Thread .CurrentThread.CurrentCulture = new CultureInfo ( "en-US" ); HTML < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="server"> < title > Untitled Page </ title > </ head > < body > < form id ="form1" runat ="server"> <

What is Page Output Caching with Example?

In this article, we will take a look at the Page Output Cache directive, which is by far the easiest way of caching content with ASP.NET What is Cache? A cache is a type of dynamic and high speed memory that is used to supplement the function of the central processing unit and the physical disk storage. The cache acts as a buffer when the CPU tries to access data from the disk so the data traveling from the CPU and physical disks can have synchronized speed. Disk reading and writing process is generally slower than CPU function. ASP.NET introduces another key/value pair object Cache . In addition to simply storing key/value pairs, Cache adds additional functionality specifically designed to store transient data: Dependencies : A key added to the Cache can set up dependency relationships that can force that key to be removed from the Cache . The supported dependencies include key, file, and time. Automatic Expiration: Underused items added to the Cache

Distributed Transaction in ASP.NET with SQL-Server

A distributed transaction is a transaction that updates data on two or more networked computer systems. Distributed transactions extend the benefits of transactions to applications that must update distributed data. Implementing robust distributed applications is difficult because these applications are subject to multiple failures, including failure of the client, the server, and the network connection between the client and server. In the absence of distributed transactions , the application program itself must detect and recover from these failures. A Distributed Transaction spans multiple data sources. Distributed Transactions enable you to incorporate several distinct operations, which occur on different systems, into an atomic action that either succeeds or fails completely. Distributed Transactions are managed by DTC, i.e., Distributed Transaction Coordinator. On the server where the trigger resides, you need to turn the MSDTC service on. You