20 items found in the ASP.NET Web Forms Category
Mikesdotnetting - Wednesday, November 17, 2010 3:00 PM
Love it or loathe it, WebMatrix is here. One of the great things about this new way of developing web sites in ASP.NET is the growing selection of helpers it offers. However, there's nothing to stop you taking advantage of this goodness within your Web Forms application. Here are a couple of ways to get a Razor-based helper to appear in your aspx file.
Mikesdotnetting - Wednesday, June 23, 2010 7:43 AM
Include files within classic ASP are about the only way to achieve some measure of code-reuse within frameworks that offer little or nothing by way of composition or inheritance. Judging by the number of questions in forums, there are still a lot of people moving across from classic ASP who are puzzled as to how to approach replacing include files within ASP.NET. A number of articles illustrate individually how to do so for site-wide layout reasons, including widgets, reusing global functions, or actually including the content of a file. However, I haven't been able to find one resource that brings all these together, hence the purpose of this article.
Mikesdotnetting - Saturday, May 22, 2010 7:41 PM
A common question in the forums is how to highlight key words found in search results. Here's an extension method that does that, both for partial matches, or whole word matches.
Mikesdotnetting - Sunday, December 6, 2009 7:46 PM
Should you store files and images in the database or the filesystem in an ASP.NET application? With SQL Server this is a dilemma, with both approaches having their pros and cons. When it comes to Access, the decision is much easier to make. Because an Access database is restricted to 2Gb, it makes more sense to store files in the file system. However, sometimes, you may not have the choice. If you have to use the database, here's how.
Mikesdotnetting - Wednesday, November 25, 2009 9:09 AM
When it comes to protecting files from unauthorised downloading, the vast majority of articles offer solutions that involve mapping common file types (.pdf, .txt, .doc etc) to ASP.NET within Internet Information Services. However, often in a shared hosting environment, you don't have access to IIS and the hosting company will not agree to providing such mappings for you, so what do you do?
Mikesdotnetting - Saturday, January 10, 2009 9:09 AM
There appear to be many articles showing how to use jQuery with ASP.NET Web Services around, but the vast majority of them illustrate the use of PageMethods that return a single value - typically "Hello World!" or the current date and time. Not much use in the real world, where you may more often need to call a service that returns a collection of complex objects. Here are a couple of examples that look at playing with more than just simple values.
Mikesdotnetting - Wednesday, December 31, 2008 9:32 AM
Over Christmas, I had a bit of spare time, so I decided to add some functionality to this site. One of the things that I added was the ability for people to post comments about specific articles, and you will see that a form has been added at the end of this article. The other thing I have been meaning to get round to is to add a Google Site Map. I believe I have created my site to be as friendly to Google's bots as possible, but there is no harm in submitting a site map to guarantee that Google knows about all the pages I want indexed.
Mikesdotnetting - Wednesday, July 9, 2008 9:19 AM
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.
Mikesdotnetting - Saturday, May 17, 2008 9:48 AM
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.
Mikesdotnetting - Thursday, May 1, 2008 11:06 AM
This short article deals with the following common MS Access-related error messages:
Mikesdotnetting - Thursday, May 1, 2008 10:02 AM
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.
Mikesdotnetting - Tuesday, November 20, 2007 10:54 PM
Mikesdotnetting - Monday, November 12, 2007 3:15 PM
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.
Mikesdotnetting - Thursday, August 30, 2007 10:29 AM
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.
Mikesdotnetting - Saturday, August 25, 2007 12:34 PM