Friday, June 29, 2007

InfoPath Forms vs. ASPX Pages in SharePoint Designer

Marketing is such a wonderful thing; it makes you believe in something which doesn't exist.
Now, why am I taking about marketing on a SharePoint blog??? Well, lately, I have been asked by many of my customers on using InfoPath 2007 for all their form developments. Now that’s a great idea. InfoPath 2007 is designed for efficient forms management and very powerful tools if used properly. What is not clear to me is that somehow Microsoft have sold this idea that InfoPath is for non-geek, you need absolutely no coding or programming knowledge to design
InfoPath. Again this may be true for simple forms or handful of non-geeky folks who were born to be curious and dare to try new things but Majority of computer users are not geeky. I have yet to find a average computer user or a knowledge worker who can design following InfoPath form (with calculation and data lookup and posting back to SharePoint ) Or someone who can understand What "Data Connection" or "Repeater" means.

When it comes to SharePoint 2007, one always has to make a choice whether to use InfoPath 2007 or design ASPX page. Here is a comparison I came up with on when It make sense to use InfoPath vs. design an ASPX

SharePoint forms

InfoPath 2007 form

ASPX Page ( using SharePoint Designer)

Design tools

InfoPath 2007- a Desktop application, part of Office Suite.

Since InfoPath forms are XML based, Programmers can theoretically design the InfoPath form in notepad

Can be designed in Microsoft© SharePoint Designer 2007 (aka Microsoft© FrontPage)

For programmers: Dependingonthe choice of tools, ASPX pages can be designed in notepad to Microsoft Visual Studio,

No-code design

Drag and drop support for form controls, table layouts etc. This is by far the best feature I have seen in InfoPath

SharePoint designer does provide drag and drop, simple validation and business logic without writting a code. However as far as User experience is concern, SharePoint designer is subpar compare to InfoPath 2007


You can submit an InfoPath forms to variety of sources including web services and SharePoint. Lookup data can also be brought from simple xml file to any line of business application and databases.

The built-in integration components to pull data from other sources are not as rich as InfoPath 2007.

Advanced design

This is big differential point. InfoPath 2007 forms out of the box look very nice. However does not support advanced scenarios

  • Tabs
  • Custom AJAX/DHTML
  • Show multiple/nested forms
  • Hand

SharePoint designer allows you to design advanced ASPX Page by direct coding html and JavaScript

Master Page

Out of the box, InfoPath forms are hosted in a new page without a master page. If you need to put a master page around your form for consistency, this require some work

1) Design a InfoPath form

2) Design a ASPX Page with master page

3) Drop <XMLFormView> control in the ASPX page and point to InfoPath

Complete Master page support


By design, a InfoPath form can be opened in

1) Any browser (e.g. IE, Firefox, Safar etc.)

2) Desktop App

You can optimize for Desktop, but you cannot optimize for a specific browser or an environment. This is a limitation with any form tools which support variety of tools. The choice of controls are limited to


Unfortunately, an ASPX pages can only be designed for browsers. But you have lot of choices to optimize for a specific browser.

Publishing to SharePoint

In spite of Microsoft's best efforts, the publishing to SharePoint is not as smooth as you would have expected from a non-programmers tool.

I love the "Blogging" feature of Word 2007; it's simple and intuitive for non-technical folks. I would have liked to see a similar approach in InfoPath 2007

Nonetheless with some training, I think InfoPath offers a great capability for publishing forms

In my personal opinion, designing an ASPX page and publishing to SharePoint is lot simpler in SharePoint designer than in InfoPath 2007

Error handling

Because InfoPath is designed for knowledge workers AKA non-programmers, the error handling is some what poor.

Most exceptions only make sense to the technical folks. But if you get some cryptic exceptions such as "Unknown error" or "exception occurred" , you are really out of luck unless you find some clues in the /12 hive log or the Event log

Pretty friendly and intuitive, you can do better error handling. You have more control on the flow compare to InfoPath 2007.


Madhur said...

very useful comparisons ...

SIMANTA said...

Worth reading.

Border Beater said...

Yes, nice post!

Praveen said...

Very useful, specially, infopath form are xml and infopath forms work on web and win apps :) thanks to Manish_Goyal for the link on sharepoint forum.

Tep Vuthy said...

Could anyone help pointing me on how to build aspx pages that work the same way as Infopath form in library/list? Vuthy

Maria Thavamani said...

Worth reading for the beginners.

Maria Thavamani said...

Worth reading for the beginners.

siriusmama said...

Thanks for the very helpful comparison!

grace said...

Thanks for informative post,It help me a lot as a html designer keep posting.

Astak said...

Exporting data i..e list items from a form library where your infopath form is hosted is bad as it only allows you to export each form entry data one by one. Where as SP designer 2007 designed aspx data are easy to export.