Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > FormView not displaying the correct templates

Thread Tools

FormView not displaying the correct templates

Nathan Sokalski
Posts: n/a
I have a FormView control with the following templates:


I am not using Paging, because the FormView is simply being used to display
the fields from a database. The user selects the record using a ListBox (I
am not using Paging because I want to allow the user to select the record
through scrolling). I have managed to get the FormView to display the data
for the selected record when the user selects a different item in the
ListBox, but the buttons that I have in the templates do not seem to be

<asp:Button ID="btnAdd" runat="server" Text="Add New Record"
<asp:Button ID="btnDelete" runat="server" Text="Delete Selected Item"
<asp:Button ID="btnEdit" runat="server" Text="Edit Record"

The buttons do not even seem to be triggering the events, such as
ItemInserting. When I tried using LinkButtons instead with the same
CommandName attributes, it triggered the ItemCommand and ModeChanging events
(There is currently no code in these events). Why won't the FormView let me
go to the EditItemTemplate and InsertItemTemplate? Is there something I need
to do in the ItemCommand or ModeChanging events? Also, although not my top
priority right now, why is the LinkButton working but not the Button, they
both have a CommandName property and inherit and implement the same classes
and interfaces? If someone can please help me here, I would appreciate it.
Nathan Sokalski Removed)

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FormView's ODS not passing correct insert params to BLL. How to debug this? bogdan ASP .Net 0 04-10-2008 12:23 PM
FormView not displaying the correct templates Nathan Sokalski ASP .Net Web Controls 0 08-26-2007 09:26 PM
how to Specializations of function Templates or Overloading Function templates with Templates ? recover C++ 2 07-25-2006 02:55 AM
Templates templates templates JKop C++ 3 07-21-2004 11:44 AM
correct or not correct? Dan HTML 7 10-02-2003 10:16 PM