FormView Edit and Add

The FormView generally makes editing a record at a time pretty easy.  However, one of the biggest problems I’ve seen with this control is that there is no way of telling the FormView to use the same template for both Add and Update.  My experience has been that most of the time, Add and Update look exactly the same, or enough the same that you could use one template and hide the inappropriate controls in the template.


One of my first attempts at fixing this problem was to use a WebUserControl.  However, I quickly discovered that you can’t databind a WebUserControl.  That was in Visual Studio 2005.  I’m not sure if it’s changed in 2008, but I assume it hasn’t.

I finally discovered a great way of using the Edit template for both the Add and Edit operations.  Simply by making use of the three tiered archietecture, you can overcome this limitation of the FormView control.


Other Related Items:

AXIOM 32MB DRAM Memory ModuleAXIOM 32MB DRAM Memory ModuleRAM Module Cisco MSR Catalyst 8500 Series AXCS-ASP-32M www.axiommemory.com 2 x 16 MB Lifetime SIMM Axiom Memory Solutions 32MB DRAM Memory Module 32 MB Axiom DRAM
Illustrated C# 2008 (Windows.Net)Illustrated C# 2008 (Windows.Net)

The unique, visual format of Illustrated C# 2008 has been specially created by author, and teacher of development methods, Daniel Solis. The concis... Read More >

If you're new here, you may want to subscribe to the mailing list to get notifications of new post and a virtual tour of past topics. Thanks for visiting!

Related Post

2 Responses to “FormView Edit and Add”

  • Art Gladney:

    Do you have a sample of the FormView Edit and Add that you can e-mail me. It looks like a great approach.

    Art

  • Dave:

    Sorry no samples. But, if you follow along with the video, you’ll have a sample.

DotNetNuke Sponsor

 

Most Valuable Blogger
Sponsor