asp.net 3.5

How to use LINQ group clause to group results in VB.NET

Web developer can use LINQ group clause to group his/her results based on a key that he/she specifies. For example Web developer could specify that the results should be grouped by the City so that all clients from New York or San Francisco are in individual groups. In this case client.City is the key.

 

Dim qryClientsByCity = From client …

Learn more

How to use LINQ group clause to group results in C#

Web developers can use LINQ group clause to group their results based on a key that they specify. For example Web developers could specify that the results should be grouped by the City so that all clients from New York or San Francisco are in individual groups. In this case client.City is the key.

 

var qryClientsByCity =

from …

Learn more

How to use RequiredFieldValidator control in ASP.NET 4.0

RequiredFieldValidator is the simplest available control in ASP.NET. You can use it to ensure that the associated control is not empty. For example, the control will fail validation if a linked text box doesn’t contain any content or contains spaces. Instead of checking for blank values you can specify a default value using the InitialValue property. In this …

Learn more

How to use RangeValidator control in ASP.NET 4.0

If you want to understand how RangeValidator works, by example, you can develop a simple test web page. This page uses a single Button web control, two TextBox controls and a RangeValidator control that validates the first text box. If validation fails, the RangeValidator control displays an error message, so you should place this control immediately next to …

Learn more

How to use CompareValidator control in ASP.NET 4.0

The CompareValidator control compares a value in one control with a fixed value or, more commonly, a value in another control.  You can use this control to check that two text boxes have the same data or that a value in one text box doesn’t exceed a maximum value established in another. The CompareValidator control, like the RangeValidator …

Learn more

Validation control class properties and its descriptions

The validation controls are found in the System.Web.UI.WebControls namespace and inherit from the BaseValidator class. This class defines the basic functionality for a validation control. The next table describes its key properties:

 

Namespace: System.Web.UI.WebControls

Assembly: System.Web (in System.Web.dll)

 

Property

Description

Supported in .NET version

ControlToValidate

The property is used to identify the control that this validator will check. Each validator can verify …

Learn more

How client-side validation works in ASP.NET 4.0

In most of modern browsers as Internet Explorer, Firefox, Google Chrome and Safari, ASP.NET 4.0 automatically adds JavaScript code for client-side validation. In this case, when the user clicks a CausesValidation button, the same error messages will appear without the page needing to be submitted and returned from the server. This increases the responsiveness of your web page. …

Learn more

How server-side validation works in ASP.NET 4.0

You can use the validator controls, described in the article How validation controls work in ASP.NET 4.0,  to verify a page automatically when the user submits it or manually in your code. The first approach is the most common. When using automatic validation, the user receives a normal page and begins to fill in the input controls. When …

Learn more

How to use LINQ orderby clause to sort results in VB.NET

Sometimes Web developers have to sort the returned data. The LINQ orderby clause sorts the elements in the returned sequence according to the default comparer for the type being sorted. For example, the following query can be extended to sort the results based on the FirstName property. Because FirstName is a string, the default comparer performs an alphabetical …

Learn more