Monday, July 12, 2004

(.NET - ASP.NET) 317515 - HOW TO: Dynamically Create Controls in ASP.NET with Visual Basic .NET

Creation of controls dynamically is one of the main features in ASP.NET. This is a QB from Microsoft Support that explains the process of creating the controls in ASp.NET at run time, using VB.NET

Friday, July 09, 2004

(.NET - ADO.NET) Asynchronous Command Execution in ADO.NET 2.0

Get an overview of the new asynchronous execution functionality in ADO.NET 2.0, the scenarios it was developed to enable, plus some of the issues to keep in mind when using this feature.

In the 2.0 release of ADO.NET, we not only wanted to make existing scenarios easier, but also enable new scenarios that either were just not possible before, or were far from ideal.

Asynchronous command execution is a good example of that. In releases of ADO.NET before 2.0, it wasn't possible to execute a command and not wait for it to complete before continuing execution. The addition of an asynchronous API enables scenarios where it is important for the application to continue execution without waiting for the database to complete the operation.

In this article, I'll cover the basics of the asynchronous database API and a couple of scenarios where this API is useful. Although we designed the API to work with any data access provider, SqlClient—the .NET data access provider for SQL Server—is the only one of the four providers included with .NET that actually supports it. Because of that, I'll use SqlClient throughout the rest of the article in the samples and descriptions of methods and classes. Bear in mind that third-party provider writers can implement this asynchronous API as well, so we may see more databases that can be accessed asynchronously. Simply change the class and method names accordingly to use these samples with other databases.

(.NET - ADO.NET) ADO.NET 2.0 Feature Matrix

ADO.NET 2.0 includes a new base-class provider model, features for all providers, and changes to System.Data.SqlClient. Get an overview of these new features, examples of their use, and a chart of which features are provider-neutral and SqlClient-specific.

ADO.NET 2.0 comes with a plethora of new features. This includes a new base-class–based provider model and features that all providers can take advantage of, as well as changes that are specific to System.Data.SqlClient. Because the .NET Framework 2.0 is being released in conjunction with SQL Server 2005, some of these features require SQL Server 2005 to be usable. This article is meant to serve as an overview and roadmap of the new features, give examples of their use, and includes a chart of which features are provider-neutral and which are SqlClient-specific. In future articles in this series, I'll be going over some of the features in greater detail. In addition, there are many new features of the DataSet and friends; these will be covered in future articles.

(.NET - ASP.NET) Personalization with ASP.NET 2.0

Create personalized applications faster and build entirely new classes of applications with the new personalization features in ASP.NET 2.0.

The variety of business solutions that can now be serviced by Web based applications is continually increasing. With added functionality and faster network connectivity, the infrastructure of the Internet now supports increasing numbers and types of users. These users access the Internet for varying reasons through many different devices, making the traditional 'anonymous' single user Web architecture insufficient.

To keep pace with the new demands for more flexible, user-oriented Web applications, Microsoft ASP.NET 2.0 includes an extensive personalization framework. The ASP.NET 2.0 personalization features include new mechanisms for identifying and registering users, tailoring a Website to a specific user, and storing user information automatically and transparently. Web Parts empower the user to include the information they deem most valuable. Through layout control and inclusion of relevant tools, users can create a site that streamlines their experience. These customizations can be persisted and made available to those users on subsequent visits to the site.

This white paper provides a technical overview of new features, including Web Parts, authentication controls, and personalization providers. If you are a beginning or mid-level developer, or just interested in the new personalization features of ASP.NET 2.0, you will benefit from the code examples and feature descriptions in this white paper.

(.NET - ASP.NET) More and Less: How ASP.NET 2.0 Features Compare Against the Starter Kit Reference Applications

The ASP.NET Starter Kits are five sample ASP.NET applications that provide code to accomplish common Web development tasks. This article looks at how the new features in ASP.NET 2.0 could be used to simplify the Starter Kits

The ASP.NET Starter Kits are a collection of five sample applications that show Web developers how to take advantage of ASP.NET 1.x features. The Starter Kits include reference implementations for important features such as interactive HTML reports; skinning and themes; authentication and authorization; mobile Web browser support; and much more. An hour spent exploring the source code from a starter kit can save many hours of programming and debugging.

In ASP.NET 2.0, Microsoft has introduced a significant number of enhancements and new features to greatly improve developer productivity and dramatically reduce the lines of code that a Web developer must generate. A number of ASP.NET 2.0 features actually make several key features of the starter kits trivial to implement. This article introduces some of the most prominent new features in ASP.NET 2.0, and contrasts the simplicity of using the ASP.NET 2.0 features against the amount of code required to implement similar features in the ASP.NET Starter Kits.

(.NET - ASP.NET) Improved Caching in ASP.NET 2.0

Stephen Walther looks at the new caching features included in ASP.NET 2.0, and how you can use them to improve the performance and scalability of your ASP.NET applications.

The most dramatic way to improve the performance of a database driven Web application is through caching. Retrieving data from a database is one of the slowest operations that you can perform in a Web site. If, however, you can cache the database data in memory, then you can avoid accessing the database with every page request, and dramatically increase the performance of your application.

The one and only drawback to caching is the problem of stale data. If you cache the contents of a database table in memory, and the records in the underlying database table change, then your Web application will display old, inaccurate data. For certain types of data you might not care if the data being displayed is slightly out of date, but for other types of data—such as stock prices and auction bids—displaying data that is even slightly stale is unacceptable.

The initial release of the Microsoft ASP.NET framework did not provide a good solution to this problem. When using the ASP.NET 1.0 framework, you just had to live with this tradeoff between performance and stale data. Fortunately, the Microsoft ASP.NET 2.0 framework includes a new feature called SQL Cache Invalidation that solves this very problem.

In this article, you'll learn about many of the new caching enhancements in the ASP.NET 2.0 framework. First, you'll learn how caching support has been integrated into the new DataSource controls. Next, you'll learn how to configure and take advantage of SQL Cache Invalidation. Finally, we'll take a look at a new control introduced with the ASP.NET 2.0 framework, which enables you to inject dynamic content into a cached page: the Substitution control.

(.NET - ASP.NET) Changes to the Validation Controls in ASP.NET 2.0

While ASP.NET 1.x supported validating user input, ASP.NET 2.0 increases the flexibility of the validation through the addition of validation groups. This article looks at this new feature, and shows you how you can use it in a number of common scenarios.

ASP.NET 2.0 includes a new feature which enables you to group form controls into distinct validation groups. This article discusses how you can take advantage of validation groups in complex form validation scenarios.

Two common validation scenarios are discussed in this article. First, you learn how to take advantage of validation groups when adding a search box to a Web page. Next, we'll discuss methods for using validation groups with databinding controls such as the GridView control.

(.NET - ASP.NET) New Security Features in ASP.NET 2.0

ASP.NET 2.0 builds on ASP.NET 1.x to enable you to more easily create and manage users, and to password-protect pages in a Web application. The new framework includes new features for working with authentication and authorization, which were designed to appeal to both Web site administrators and developers.

Web site administrators can take advantage of the new Web Site Administration Tool to create new users and roles, and to control access to pages in a Web application. The Web Site Administration Tool is a set of prewritten ASP.NET pages that can be used by individuals with no programming skills to configure a Web application.

Developers can take advantage of the new Login controls in order to quickly build security related pages in a Web application. For example, a developer can create a login page simply by dragging a Login control onto an .aspx page. By taking advantage of the Login controls, a developer can build a login page, a registration page, or a password recovery page without writing any code.

Finally, the ASP.NET 2.0 framework contains new security related features which will appeal to advanced developers. The new Membership API is a set of classes that contains methods for creating and retrieving information about application users. In addition, the new framework contains classes that make it easier to work with custom user roles.

(.NET - ASP.NET) Introducing the ASP.NET 2.0 GridView and DetailsView Controls

The ASP.NET 2.0 framework introduces two new controls for working with database data: the GridView control and the DetailsView control. You use the GridView control when working with a set of database records. The DetailsView control is used when working with individual records.

The GridView control is the successor to the DataGrid control. While Microsoft ASP.NET 2.0 still includes the DetailsGrid control, you are encouraged to take advantage of the new features of the GridView control.

The GridView control enables you to perform many of the same tasks as you would previously perform with the DetailsGrid control. The advantage of the GridView control is that, in many cases, you can perform these tasks without writing any code. The GridView control enables you to:

Display a set of database records.
Sort a set of database records.
Page through a set of database records.
Edit a set of database records.
In addition, unlike the DetailsGrid control, the GridView control enables you to sort and page through database records without requiring a postback to the server. The GridView control, optionally, uses client-side script to enable you to sort and page database records without performing a form post.

The DetailsView control is an entirely new control introduced with ASP.NET 2.0 that enables you to work with individual database records. You can use the DetailsView control on its own, to display or edit a single database record. When used in conjunction with the GridView control, you can use the DetailsView control to quickly build master/detail forms.

Wednesday, July 07, 2004

(Tidbits) Quality in Life

My wife works for a CMM level5 organization.We woke up at 6 AM this morning and things got off to a pretty rough start right away. She asked me "What time is it dear?". I told her it was 5 AM on 5/05/ 2005 - to which she looked terribly worried.

"Why?? What is wrong?"

"You see, yesterday we decided to wake up at 5.30 AM and it is only 5 AM now!!"

"So what?" I asked very innocently.

"What kind of an organization do you work for? Quality is in my blood. People working in a CMM level 5 organization will tell you what implications this can have on our day and our life!!. We need to do a CAUSAL ANALYSIS for this blunder right away".

I tried to take the 'knowledge-free common-sense approach' and told her "The reason is very obvious. Power supply went off by 6 AM and the mosquitoes and the Chennai heat / moisture woke us up.. hee.. hee"

"Shut up" she said. "You people are always looking for an excuse, putting the blame on others. Why don't you take some OWNERSHIP and do something about it? OK. The power went off. Did you at least call the electricity board?"

Before I could ask what she had done about it, she shot off to the kitchen to make coffee. I went in to the kitchen with a request "Dear, I know we had decided that today was my turn to cook, but my bike has not been washed for the last 2 weeks as I was busy entertaining guests for the marriage.

Can you please cook today as I get my bike cleaned?". She gave a very considerate _expression and said "No probs! Just raise a CHANGE REQUEST in the IHMS and carry on".

"IHMS?? What IHMS ?" I asked. "Oh! You do not know this stuff. I have to teach you everything ... People working in our organization use an 'Integrated Home Management System' to organize our personal lives. You can see it in the PC in the living room. It is pretty straight forward. Even YOU can use it?

BTW, it is even web enabled and you can do this work from your office too".

I had had enough. I simply did what she said without uttering a word. As I sat to have breakfast, she brought some Idly with all the love in the world. I was pleased. "My marriage will not break after all" I thought to myself as I tasted it ... and.. it tasted terrible. I almost broke my teeth trying to take a bite... and asked her "You call this Idly?"

She put this 'I know it all' look and said "I know you people raise such issues. That is why I have a DOCUMENTED PROCEDURE to make idlys. Look .. it has even been reviewed and approved by YOUR Mom... and I have once again documented everything I did this morning... even the quantity of salt I added.. can you find anything wrong with this?" she asked... showing off all her documentation.

"I certainly cannot find anything wrong with your documentation, but can find a lot wrongs in the Idly you have made" I thought to myself and headed for work.

Hardly had I switched on my machine at work when I had to pick up the phone. "I am your wife calling and I have some big news for you". 'Not again' I thought.

"CMM people have come up with a new level. It is called level 6. Our company is planning to be level 6 certified by 06/06/2006. How great .....right??"

"Look my dear wife!" I told her. "I have news for you too. RMG has allocated me to an undisclosed project in an undisclosed location for .....err... indefinite duration..!"

"What??..."

"The only information I could gather was that I have to travel ALONE.."