FormView not displaying the correct templates
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.
|All times are GMT. The time now is 11:33 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.