39 items found in the ASP.NET 2.0 Category

AccessDataSource, SqlDataSource and connecting to Access databases in ASP.NET

Saturday, May 17, 2008 9:48 AM

ASP.NET 2.0 MS Access ADO.NET ASP.NET Web Forms

There are a variety of options for connecting to Access databases within ASP.NET pages. This article attempts to cover the choices and offer recommendations for getting the best out of Access.

Click to read more about AccessDataSource, SqlDataSource and connecting to Access databases in ASP.NET ...

Viewed 84142 times

13 Comments for this item

80040E14 - MS Access Syntax Error messages

Thursday, May 1, 2008 11:06 AM

ASP.NET 2.0 MS Access ADO.NET ASP.NET Web Forms

This short article deals with the following common MS Access-related error messages:

Click to read more about 80040E14 - MS Access Syntax Error messages ...

Viewed 25534 times

6 Comments for this item

Simple Login and Redirect for ASP.NET and Access

Thursday, May 1, 2008 10:02 AM

ASP.NET 2.0 MS Access ADO.NET ASP.NET Web Forms

Quite often, I see questions asked about creating a simple login page for use with Access from people who don't want to take advantage of the built-in Forms Authentication framework within ASP.NET. The following samples show how relatively easy this is to accomplish.

Click to read more about Simple Login and Redirect for ASP.NET and Access ...

Viewed 279902 times

35 Comments for this item

Solving the Operation Must Use An Updateable Query error

Wednesday, April 30, 2008 10:48 PM

ASP.NET 2.0 MS Access ADO.NET ASP.NET 3.5

The unbelievably cryptic Operation Must Use An Updateable Query error is the bane of developers who are just starting out with Access and ASP.NET. You've done your code, plopped your database file in the App_Data folder (or at least, you should have done), and try to run a page that INSERTs or UPDATEs records, and it all stops dead. This brief article explains the cause of the error, and the steps required to stop it recurring.

Click to read more about Solving the Operation Must Use An Updateable Query error ...

Viewed 178220 times

46 Comments for this item

How to get your forum question answered - avoid thread-jacking

Tuesday, November 13, 2007 12:33 PM

ASP.NET 2.0

If you have just been directed to this page, it may be because you have just thread-jacked. If you are not sure what that means, read on for an explanation, and some guidance.

Click to read more about How to get your forum question answered - avoid thread-jacking ...

Viewed 887089 times

26 Comments for this item

An ASP.NET Search Engine with MS Access for optional search criteria

Monday, November 12, 2007 3:15 PM

ASP.NET 2.0 MS Access ADO.NET ASP.NET Web Forms

Creating a search interface for one user-supplied value is pretty straightforward: a TextBox for input, a Button and some SQL that searches one or more fields where the values are LIKE '%' + @searchterm + '%' is all that is needed. While it works, this approach is not very flexible. For example, what if you wanted to search for an Employee whose last name contains "a", and don't want those where the first name or city contains "a"? The traditional solution to this is to dynamically construct the SQL statement based on what values were passed by the user. However, building the SQL string can get repetitive, boring and messy. Here is a cleaner way to allow the user to narrow down searches across multiple criteria with the use of optional parameters, and just 3 lines of programming code.

Click to read more about An ASP.NET Search Engine with MS Access for optional search criteria ...

Viewed 25582 times

4 Comments for this item

Referencing CheckBoxes in GridView, Repeater and DataList controls

Thursday, August 30, 2007 10:29 AM

ASP.NET 2.0 ASP.NET Web Forms

If you want to find which CheckBoxes were selected in a multiple record DataBound control, the way that you you do it depends on the type of control you use. These examples demonstrate a CheckBox control being added to a GridView, Repeater and a DataList. For simplicity, I have placed all three controls on the same page, and used the Access version of theNorthwind database. One AccessDataSource control is used to bind the results of "SELECT [CategoryID], [Description], [CategoryName] FROM [Categories]" to all three controls.

Click to read more about Referencing CheckBoxes in GridView, Repeater and DataList controls ...

Viewed 65146 times

6 Comments for this item

ViewState, form fields, labels and Javascript

Saturday, August 25, 2007 12:34 PM

ASP.NET 2.0 Javascript ASP.NET Web Forms

An interesting question came up on the ASP.NET forums asking why a TextBox which has its value changed by client-side Javascript persists those changes across postbacks, while a Label does not. And in a nut shell, this question covered two of the biggest causes of confusion among newcomers to ASP.NET: the difference between ViewState and IPostBackDataHandler; and the difference between client-side operations and server-side operations.

Click to read more about ViewState, form fields, labels and Javascript ...

Viewed 50034 times

5 Comments for this item

Bind Data From a SqlDataSource to a Label

Saturday, August 25, 2007 10:32 AM

ASP.NET 2.0 ADO.NET ASP.NET Web Forms

Label controls in ASP.NET don't have a smart tag that allows you to select a data source, so at first glance, it is not easy to see how to bind a value returned from a SqlDataSource or AccessDataSource control to the label. Here's how to programmatically access the data returned by such a DataSource and apply it to a non-databound control.

Click to read more about Bind Data From a SqlDataSource to a Label ...

Viewed 170719 times

31 Comments for this item

Consuming RSS feeds in an ASP.NET page

Saturday, August 18, 2007 11:12 PM

ASP.NET 2.0 ASP.NET Web Forms

I like reading Scott Guthrie's blog. Trouble is, I get so busy, I forget to go over there and have a look to see what's new. I was searching for something the other day, and stumbled across someone else's blog (I forget whose), but I noticed that they had the 5 most recent items in Scott's blog embedded in their home page. It was only then that I discovered that Scott Mitchell has written a whole load more tutorials on Data Access, and that these have been available for a while. So I got to thinking that I should add a feed from Scott G's site onto the home page here, so I can be updated more quickly. Here's the bare bones of how I did it.

Click to read more about Consuming RSS feeds in an ASP.NET page ...

Viewed 12004 times

1 Comment for this item

List the contents of a folder and link to each file

Friday, August 10, 2007 9:33 PM

ASP.NET 2.0

Iterating the contents of a folder is straightforward using classes from System.IO, and listing them as links to the actual file just requires a bit of html added to each file name.

Click to read more about List the contents of a folder and link to each file ...

Viewed 15191 times

2 Comments for this item

Exporting data to a CSV, tab delimited or other text format

Thursday, August 2, 2007 11:41 PM

ASP.NET 2.0 ADO.NET

A question that often comes up in forums is how to export data to a CSV file, or other text format. Here's a method that takes data from a DataReader and writes it to a file.

Click to read more about Exporting data to a CSV, tab delimited or other text format ...

Viewed 35858 times

4 Comments for this item

Displaying One-To-Many Relationships with Nested Repeaters

Friday, July 27, 2007 2:24 PM

ASP.NET 2.0 ADO.NET ASP.NET Web Forms

This item could also have been entitled "Displaying Master-Detail Data" or "Displaying Categorised Data", but the principal is the same: you have what are essentially headings or categories, and a group of entries that belong to each heading that you want to display. Typical examples would include the Models of cars by Manufacturer, or Employees by Department. Here's how to do it quite simply using nested Repeaters.

Click to read more about Displaying One-To-Many Relationships with Nested Repeaters ...

Viewed 43320 times

2 Comments for this item

Recent Comments

Allen Michaels 12/17/2014 4:37 PM
In response to Cascading DropDownLists with jQuery and ASP.NET
Fantastic thank you so much!...

Emily 12/17/2014 12:36 PM
In response to Parameterized IN clauses with ADO.NET and LINQ
Thanks, very helpful!!!! Can i use this for multiple in's ????? IN (.....) and IN(...) and IN...

sss 12/16/2014 3:06 PM
In response to Solving the Operation Must Use An Updateable Query error
good...

Gjuro 12/15/2014 10:30 PM
In response to Examining the Edit Methods and Edit View
You have one fromr (and it should be from, I suppose). :-)...

Gjuro 12/15/2014 10:27 PM
In response to Adding Search
Hi, thnx for all this C#->VB translations. Yet, the following code block is (slightly) in error it a...

Scot 12/14/2014 1:39 PM
In response to Entity Framework 6 Recipe - Alphabetical Paging In ASP.NET MVC
Thanks,Mike I found solution....

Gjuro 12/13/2014 10:52 PM
In response to Accessing Your Model's Data from a Controller
The article mentions "Creating an Entity Framework Data Model for an ASP.NET MVC Application" (at is...

Samuel 12/13/2014 8:40 AM
In response to Displaying The First n Characters Of Text
I have failed to use the extension because it throws an error that it doesn't recognise the chop be...

Ignas 12/12/2014 5:11 PM
In response to Cleaner Conditional HTML Attributes In Razor Web Pages
Any suggestions for Html Helper elements with HtmlAttributes, when you need to conditionally set it...

Gautam 12/11/2014 8:50 PM
In response to Validation In Razor Web Pages 2
Hi Mike Is this required for V3, non html helper input...