asp.net 3.5

How LINQ works with in memory collections in C#

Web developer uses in this case the simplest form of LINQ – LINQ to Objects.  Let for example Web developer has some sort of data class, like the Clients class shown next:

 

public class Client

{

public int ClientID { get; set; }

public string FirstName { get; set; }

public string LastName { get; set; }

Learn more

How to restrict access to selected application pages

Web developer follows the approach described in the article when he/she wants to make some pages accessible to the public. In this case Web developer should implement the solution described in the article How to restrict access to all application pages in C# or in the article How to restrict access to all application pages in VB.NET …

Learn more

Summary of the LINQ providers included in .NET 4

Language Integrated Query (LINQ) is a set of language extensions for querying data. LINQ defines keywords that Web developer can use to select, filter, sort, group, and transform data. These keywords can work with different types of data. LINQ is a deeply integrated part of .NET, but it isn’t an ASP.NET-specific feature, and it can be used equally …

Learn more

How to restrict access to all application pages in VB.NET

Web developer follows the approach described in the article, when he/she has to restrict access to the pages of his/her application to authorized users only. In this case Web developer should change the web.config settings of his/her application to specify Forms authentication, and then create an .aspx login page to collect user credentials and complete the authentication check.

Web …

Learn more

How to restrict access to all application pages in C#

Web developer follows the approach described in the article, when he/she has to restrict access to the pages of his/her application to authorized users only. In this case Web developer should change the web.config settings of his/her application to specify Forms authentication, and then create an .aspx login page to collect user credentials and complete the authentication check.

Web …

Learn more

How to use SQL Delete statement

Web developer uses SQL Delete statement to remove one or more rows based on specified criteria:

DELETE FROM [table] WHERE [search_condition]

The following example removes a single matching row from the Clients table:

DELETE FROM Clients WHERE cli_id=’334-56-2289′

Note: If client record is linked to one or more records in other tables, for example ClientAccounts table, Web developer should delete linked records …

Learn more

How to use SQL Update statement

Web developer uses SQL Update statement to selects all the records that match a specified search expression and then to modify them all according to an update expression. At its simplest, the Update statement has the following format:

UPDATE [table] SET [update_expression] WHERE [search_condition]

Typically, the Update statement to is used to modify a single record. The following example adjusts …

Learn more

How to use SQL Insert statement.

Web developer can use the SQL Insert statement to add a new record to a table with the information he/she specifies:

INSERT INTO [table] ([column_list]) VALUES ([value_list])

Web developer can provide the information in any order he/she wants, as long as he/she makes sure the list of column names and the list of values correspond exactly:

INSERT INTO Clients (cli_id,cli_finame, …

Learn more

How to use aggregate SQL Select statements

Web developer can use special aggregate SQL functions which work with a set of values but return only a single value. For example, Web developer can use use an aggregate function to count the number of records in a table or to calculate the average price of a product:

     – Avg(fieldname) – Calculates the average of all values in …

Learn more

How to perform string matching with the SQL Like operator

Web developer can use the SQL Like operator to perform partial string matching to filter records where a particular field starts with, end with, or contains a certain sets of characters. For example, if Web developer wants to see all store applicants names that start with C, he/she could use the following statement:

SELECT * FROM Applicants WHERE appl_fname …

Learn more