Introduction This guide will show you how to create a custom TextBox control that will display a value when empty, used for a label of the field. For instance, in an address form, this would show "Customer Name" in an empty text box.
Introduction When implementing some software for another project, I came across several requirements involving calculations with time periods. These calculations were an important part of the solution and had high demands in respect to the correctness and accuracy of the results. The required functionality covered the following areas: Support for individual time periods Working with calendar periods within calendar years Working with calendar periods deviating from the calendar year (fiscal or school periods) The time calculations should be made available to both server components (Web Services and tasks) as well as for a rich client (Silverlight).
Introduction In the last project I was working on, we needed to add some performance counters to measure the duration of various parts of the system. There is information on performance counters in MSDN and also in CodeProject , but we just could not find the exact information we were looking for. We started by creating a performance counters manager for one part of our system that specifically handled counting duration of operations. But then, we realized that we required similar functionality in other parts of the system.
Serialize/deserialize your objects using generics. Customize settings like indentation, encoding, namespaces and others. Table of contents XML Serialization Overview XML serialization is the process of converting an object into a XML string in order to persist it to memory, a database, or a file.
Introduction There is a lot of buzz about Claim based Authentication. In this article, we'll understand what is Claim based Authentication, what are the benefits and a lot more.
Managing Exception/Error is a common task in any application. In ASP.NET, there are many ways to handle those errors or exceptions, for example, when an error or exception occurrs in an ASP.NET application, the system is going to send a formatted error message to specified developers or teams mentioned in the email list. The difference will be the body of the email will contain exactly the same formatted error as the ASP.NET generated one to display the error or exception details when occurred.
Introduction Through this article, I'll try to explain how we can use Google charts for reporting purposes in ASP.NET web applications. Report generation is something quite common and we need to generate self explanatory and good looking reports to the users almost every time. “Images always speak more than words”. So instead of just showing the figures in our reports, we can let the users see diagrammatic charts which can help the users to analyze the whole data more quickly and easily. Though Microsoft itself has its charting controls for .NET, but we integrate it with other great technology by Google.
Introduction This article demonstrates how to setup a basic unit test project to take care of code coverage of a standard ASP.NET website. This article assumes you have created an ASP.NET Web Application project (not ASP.NET Website). Using the Code Setup a Unit Test Project Open your solution in Visual Studio 2010 Click Test | New Test Select Basic Unit Test (or any of the others) Name your test class Add to or create a new test project (preferably ProjectName.Tests )
Introduction In the present scenario, we need our text boxes to act more user friendly, so auto suggest is a feature that makes it more user friendly. Moreover the chance of making typo mistakes also reduces.
I am a big fan of the Web.Config Transformations that got introduced with a while back. Prior to them being inherently supported one could accomplish the same thing with part of the Enterprise Library, and prior to that one could leverage a custom MSBuild Task or the XMLPoke Task to get your web.config updated based on the environment it was targeting. Having your configuration elements managed with a transform file makes it a bit easier to manage and keep track of your settings that could change based on environment or settings. Without this each developer on your team might need to create host entries and keep their folder structure the same to ensure the settings work for each of their machines.
On each release (or build operation), we are incrementing our build number to flag that we've done something different. Although Visual Studio has an auto-build/revision feature (use the "*" in the " AssemblyVersion " attribute), like the following code shows: [assembly: AssemblyVersion( " 1.0.0.*" )]
This code will help you when you need to define a method code-behind and want to call that method from the client side. jQuery has made life simple. There is a very easy way to do this. Earlier, we knew one way that we needed to add our method as a WebMethod if we wanted to call a method from the code-behind at the client side. Using this method, we can do it without calling our method in a WebMethod . In this example, I am writing a method to delete a particular user when the Delete key is hit.
Introduction Do you get annoyed when you have to do so many things just to open up a compressed file you just downloaded? You have to (Vista+): Right-click Click Properties Click Unblock Click OK Right-click Extract all Extract Delete the .zip file It's like so many other things in Windows, too much clicking and too many steps!
Introduction For one of my projects, I have felt the need of a text editor with syntax highlighting. At first, I used a component inherited from RichTextBox , but while using it for a large amount of text I found out that RichTextBox highlights very slowly a large number of colored fragments (from 200 and more). When such highlighting has to be made in a dynamic way, it causes a serious problem.
Introduction In my first three articles on CodeProject.com, I have explained the fundamentals of Windows Communication Foundation (WCF), including: From early this year, I have started to write a series of articles to explain LINQ, LINQ to SQL, Entity Framework, and LINQ to Entities. Followings are the articles I wrote or plan to write for LINQ, LINQ to SQL, and LINQ to Entities: And as I said, after finishing these five articles, I will come back to write some more articles on WCF from my real work experience, which will be definitely helpful to your real world work, if you are using WCF right now. Overview