10.5. Enhancing Forms with ASP.NET Controls

By now, you have created the user interface for a number of forms by using both HTML and ASP.NET controls. It's very important for you to review Chapters 1518 to be able to implement the complete form functionality because most forms are intended to collect data from users and then save it to a back-end data source for review, analysis and investigation, retrieval, etc.

Forms are a pivotal piece of Web site implementation. As a result, most of the ASP.NET 2.0 controls concentrate on making form development easier and more declarative. Still, with so many controls available, it's important to pick the right ones based on your requirements. Here are some considerations that you might find useful when developing form Web pages via SharePoint Designer:

  • Forms tend to become large when and as more information is required to be collected from users. It's a good practice to page such large forms into multiple steps. This helps reduce user frustration in scrolling down Web pages while filling in forms. You can use the Wizard control to implement a multipage form quite effortlessly.

  • There are various formats and styles in which users may perceive date and time. Therefore, it's a bad idea to have users fill out the dates in a text field. It's recommended that you use the Calendar control instead. Still, if the form design mandates that you use simpler controls, such as Textbox, ensure that you validate it properly by, for example, using the RegularExpressionValidator control. While the ASP.NET controls are pretty robust in this area, to ensure protection from malicious user input and avert attacks, ensure that you properly validate user input before submission to the back-end data source.

Wherever applicable, you should use predefined or data-bound Dropdown controls or Listbox controls to facilitate user input in the forms. Users like to make a choice from a list of options rather than having to type in the values. Besides, this automatically reduces the chances of malicious user input.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.234.179