Archive for the ‘ASP.net’ Category

Use MvcContrib Grid to Display a Grid of Data in ASP.NET MVC

The past six articles in this series have looked at how to display a grid of data in an ASP.NET MVC application and how to implement features like sorting, paging,
and filtering. In each of these past six tutorials we were responsible for generating the rendered markup for the grid. Our Views included the
<table> tags, the <th> elements for the header row, and a foreach loop that emitted a series of
<td> elements for each row to display in the grid. While this approach certainly works, it does lead to a bit of repetition and inflates the size
of our Views.

The ASP.NET MVC framework includes an HtmlHelper class that adds support
for rendering HTML elements in a View. An instance of this class is available through the Html object, and is often used in a View to create action links
(Html.ActionLink), textboxes (Html.TextBoxFor), and other HTML content. Such content could certainly be created by writing the markup by hand
in the View; however, the HtmlHelper makes things easier by offering methods that emit common markup patterns. You can even
create your own custom HTML Helpers by adding
extension methods to the HtmlHelper class.

MvcContrib is a popular, open source project that adds various functionality to the ASP.NET MVC framework. This includes
a very versatile Grid HTML Helper that provides a strongly-typed way to construct a grid in your
Views. Using MvcContrib’s Grid HTML Helper you can ditch the <table>, <tr>, and <td> markup, and instead use
syntax like Html.Grid(...). This article looks at using the MvcContrib Grid to display a grid of data in an ASP.NET MVC application. A future installment
will show how to configure the MvcContrib Grid to support both sorting and paging. Read on to learn more!

Read More >

more

Popularity: unranked [?]

Filling in PDF Forms with ASP.NET and iTextSharp

The Portable Document Format (PDF) is a popular file format for documents. PDF files are a popular document format
for two primary reasons: first, because the PDF standard is an open standard, there are many vendors that provide PDF readers across virtually all operating systems,
and many proprietary programs, such as Microsoft Word, include a “Save as PDF” option. Consequently, PDFs server as a sort of common currency of exchange. A person
writing a document using Microsoft Word for Windows can save the document as a PDF, which can then be read by others whether or not they are using Windows and whether
or not they have Microsoft Word installed. Second, PDF files are self-contained. Each PDF file includes its complete text, fonts, images, input fields, and other content.
This means that even complicated documents with many images, an intricate layout, and with user interface elements like textboxes and checkboxes can be encapsulated in
a single PDF file.

Due to their ubiquity and layout capabilities, it’s not uncommon for a websites to use PDF technology. For example, when purchasing goods at an online store you may
be offered the ability to download an invoice as a PDF file. PDFs also support form fields, which are user interface elements like textboxes, checkboxes,
comboboxes, and the like. These form fields can be entered by a user viewing the PDF or, with a bit of code, they can be entered programmatically.

This article is the first in a multi-part series that examines how to programmatically work with PDF files from an ASP.NET application using
iTextSharp, a .NET open source library for PDF generation. This installment shows how to use iTextSharp to
open an existing PDF document with form fields, fill those form fields with user-supplied values, and then save the combined output to a new PDF file. Read on to learn more!

Read More >

more

Popularity: unranked [?]

2010’s Most Popular Articles

The end of the year is upon us, 2010 is about to be in the books. When closing out a year I like to take a look back at the articles I wrote over the year and see which ones
resonated the most with readers. Which ones generated the most reader emails? Which ones were read the most? Such a retrospective analysis highlights what content was of
most interest to developers in the trenches, and this data is used to guide article topics in the new year.

I ended last year with a “Best Of” article – see 2009’s Most Popular Articles – and decided to continue
this tradition. Such “Best Of” articles give both regular and new readers a chance to discover (or rediscover) the most favored content from the year. So here
it is – a list and synopsis of the 2010’s most popular articles on 4GuysFromRolla.com.

Read More >

more

Popularity: unranked [?]

2010’s Most Popular Articles

The end of the year is upon us, 2010 is about to be in the books. When closing out a year I like to take a look back at the articles I wrote over the year and see which ones
resonated the most with readers. Which ones generated the most reader emails? Which ones were read the most? Such a retrospective analysis highlights what content was of
most interest to developers in the trenches, and this data is used to guide article topics in the new year.

I ended last year with a “Best Of” article – see 2009’s Most Popular Articles – and decided to continue
this tradition. Such “Best Of” articles give both regular and new readers a chance to discover (or rediscover) the most favored content from the year. So here
it is – a list and synopsis of the 2010’s most popular articles on 4GuysFromRolla.com.

Read More >

more

Popularity: unranked [?]

2010’s Most Popular Articles

The end of the year is upon us, 2010 is about to be in the books. When closing out a year I like to take a look back at the articles I wrote over the year and see which ones
resonated the most with readers. Which ones generated the most reader emails? Which ones were read the most? Such a retrospective analysis highlights what content was of
most interest to developers in the trenches, and this data is used to guide article topics in the new year.

I ended last year with a “Best Of” article – see 2009’s Most Popular Articles – and decided to continue
this tradition. Such “Best Of” articles give both regular and new readers a chance to discover (or rediscover) the most favored content from the year. So here
it is – a list and synopsis of the 2010’s most popular articles on 4GuysFromRolla.com.

Read More >

more

Popularity: unranked [?]

Displaying a Sorted, Paged, and Filtered Grid of Data in ASP.NET MVC

Over the past couple of months I’ve authored five articles on displaying a grid of data in an ASP.NET MVC application. The first
article in the series focused on simply displaying data. This was followed by articles showing how
to sort, page, and
filter a grid of data. We then examined how to both sort
and page
a single grid of data. This article looks at how to add the final piece to the puzzle: we’ll see how to combine sorting, paging and filtering when displaying
data in a single grid.

Like with its predecessors, this article offers step-by-step instructions and includes a complete, working demo available for download at the end of the article.
Read on to learn more!

Read More >

more

Popularity: unranked [?]

2010’s Most Popular Articles

The end of the year is upon us, 2010 is about to be in the books. When closing out a year I like to take a look back at the articles I wrote over the year and see which ones
resonated the most with readers. Which ones generated the most reader emails? Which ones were read the most? Such a retrospective analysis highlights what content was of
most interest to developers in the trenches, and this data is used to guide article topics in the new year.

I ended last year with a “Best Of” article – see 2009’s Most Popular Articles – and decided to continue
this tradition. Such “Best Of” articles give both regular and new readers a chance to discover (or rediscover) the most favored content from the year. So here
it is – a list and synopsis of the 2010’s most popular articles on 4GuysFromRolla.com.

Read More >

more

Popularity: unranked [?]

2010’s Most Popular Articles

The end of the year is upon us, 2010 is about to be in the books. When closing out a year I like to take a look back at the articles I wrote over the year and see which ones
resonated the most with readers. Which ones generated the most reader emails? Which ones were read the most? Such a retrospective analysis highlights what content was of
most interest to developers in the trenches, and this data is used to guide article topics in the new year.

I ended last year with a “Best Of” article – see 2009’s Most Popular Articles – and decided to continue
this tradition. Such “Best Of” articles give both regular and new readers a chance to discover (or rediscover) the most favored content from the year. So here
it is – a list and synopsis of the 2010’s most popular articles on 4GuysFromRolla.com.

Read More >

more

Popularity: unranked [?]

2010’s Most Popular Articles

The end of the year is upon us, 2010 is about to be in the books. When closing out a year I like to take a look back at the articles I wrote over the year and see which ones
resonated the most with readers. Which ones generated the most reader emails? Which ones were read the most? Such a retrospective analysis highlights what content was of
most interest to developers in the trenches, and this data is used to guide article topics in the new year.

I ended last year with a “Best Of” article – see 2009’s Most Popular Articles – and decided to continue
this tradition. Such “Best Of” articles give both regular and new readers a chance to discover (or rediscover) the most favored content from the year. So here
it is – a list and synopsis of the 2010’s most popular articles on 4GuysFromRolla.com.

Read More >

more

Popularity: unranked [?]

2010’s Most Popular Articles

The end of the year is upon us, 2010 is about to be in the books. When closing out a year I like to take a look back at the articles I wrote over the year and see which ones
resonated the most with readers. Which ones generated the most reader emails? Which ones were read the most? Such a retrospective analysis highlights what content was of
most interest to developers in the trenches, and this data is used to guide article topics in the new year.

I ended last year with a “Best Of” article – see 2009’s Most Popular Articles – and decided to continue
this tradition. Such “Best Of” articles give both regular and new readers a chance to discover (or rediscover) the most favored content from the year. So here
it is – a list and synopsis of the 2010’s most popular articles on 4GuysFromRolla.com.

Read More >

more

Popularity: unranked [?]