Latest Entries
Lists with iTextSharp
calendar_today 20 October 2008 08:32
Having already looked at how to create a PDF document with iTextSharp, set fonts and their styles and add text, this article turns its attention to lists. Ordered and unordered lists will be covered. You may want to review earlier articles in this series, if you haven't already done so.
iTextSharp - Adding Text with Chunks, Phrases and Paragraphs
calendar_today 18 October 2008 22:32
This is the third in a series of articles that looks at using the open source component, iTextSharp from within ASP.NET to generate PDFs. Just as HTML and ASP.NET provide containers for varying ampounts of textual content, iTextSharp offers the Chunk, Phrase and Paragraph classes. Before going on, if you would like to read earlier articles, they are:
iTextSharp - Working with Fonts
calendar_today 15 October 2008 22:07
Following on from my introduction to iTextSharp, the free PDF utility that lets you work with PDF files within ASP.NET, this article looks at working with fonts in PDF documents that you create. If you haven't read the first article in this series, I recommend that you do so now.
Create PDFs in ASP.NET - getting started with iTextSharp
calendar_today 12 October 2008 11:26
The .NET framework does not contain any native way to work with PDF files. So, if you want to generate or work with PDF files as part of your ASP.NET web application, you will have to rely on one of the many third party components that are available. Google will help you to find one that fits your budget, as well as a range of open-source free components. One of the free components is iTextSharp, which is a port of a well known Java utility, iText.
Import Data From Excel to Access with ASP.NET
calendar_today 09 July 2008 09:19
Building on my previous article on importing text files of various formats to an Access database, here's how to do the same thing simply and efficiently with Excel files.
AccessDataSource, SqlDataSource and connecting to Access databases in ASP.NET
calendar_today 17 May 2008 09:48
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.
80040E14 - MS Access Syntax Error messages
calendar_today 01 May 2008 11:06
This short article deals with the following common MS Access-related error messages:
Simple Login and Redirect for ASP.NET and Access
calendar_today 01 May 2008 10:02
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.
Solving the Operation Must Use An Updateable Query error
calendar_today 30 April 2008 22:48
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.
I'm a Microsoft MVP!
calendar_today 05 April 2008 10:26
I was delighted to find out on April Fool's Day (?) that I have been awarded the 2008 Microsoft® MVP Award.
Sql JOINS and the Sql Server Management Studio Query Designer
calendar_today 28 November 2007 13:19
There are a whole bunch of articles, blog entries and tutorials that seek to explain how SQL JOINS work. Some of them are excellent, and others are just confusing. The reason I am adding my go at trying to clarify JOINS to the mix is to highlight how proper use of the tools available to you can seriously reduce the chances of getting the JOIN syntax or type wrong. Since JOINS are all about how to relate data from one table to another, I thought it appropriate to illustrate the subject using Parents and Children (who may, or may not be related to eachother). So let's meet the families.
Search Engine-Friendly Custom Paging with the GridView and LINQ to SQL
calendar_today 20 November 2007 22:54
The main problem I find with the built-in paging functionality offered by the GridView control is that the paging links are managed by Javascript. This is a bit awkward for people who disable, or don't have Javascript in their browser, but more importantly, the links can't be triggered by search engines. If you rely on the GridView to paginate links to content, this can prove disastrous, and much of your content will be inaccessible to search engines. Motivated by Scott Guthrie's series of blog entries on LINQ to SQL, available in the .Net 3.5 framework, I set about getting some custom paging working with html paging links.
Migrating from Sql Server to Access in ASP.NET
calendar_today 16 November 2007 10:45
Yes, you did read that correctly. Here's the situation: you know that Sql Server is by far the superior database system (if indeed MS Access can be called a database system). You also know that MS Access databases are not recommended as a data store for web applications. You are comfortable with Sql Server, and haven't really looked at Access for years - if at all. But now, your boss or your client wants you to use it in the next project.
How to get your forum question answered - avoid thread-jacking
calendar_today 13 November 2007 12:33
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.
An ASP.NET Search Engine with MS Access for optional search criteria
calendar_today 12 November 2007 15:15
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.
Reading Text files into Access with ASP.NET
calendar_today 09 September 2007 21:20
The Jet 4.0 OLEDB driver is a remarkable beast. Not only will it allow connections to MS Access .mdb files and MS Excel spreadhseets, but it will also allow you to connect to and query a variety of text file formats. Here are some examples that illustrate this capability when applied to importing text based data into Access.
Referencing CheckBoxes in GridView, Repeater and DataList controls
calendar_today 30 August 2007 10:29
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.
ViewState, form fields, labels and Javascript
calendar_today 25 August 2007 12:34
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.
Bind Data From a SqlDataSource to a Label
calendar_today 25 August 2007 10:32
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.
Object reference not set to an instance of an object and INamingContainer
calendar_today 21 August 2007 11:36
A list of standard ASP.NET web controls that implement INamingContainer