FormView Edit button does not work for me

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

Do I have to do more than the following to get the Edit button to work?

Should the user be able to edit the data when the Edit button is clicked
without any code by me?

When the button is clicked I must get a postback because Page_Load runs
(nothing in there executes).



Thanks for any help at all



<%@ Page AutoEventWireup="false"

....snip

<asp:FormView ID="FormViewUsers" DataSourceID="SqlDataSourceUsers"
AllowPaging="true"

DataKeyNames="UserID" HeaderText="Users' Current Record" EmptyDataText="No
users found."

runat="server">

<HeaderStyle HorizontalAlign="Center" Wrap="false" />

<RowStyle Wrap="false" />

<PagerStyle />

<ItemTemplate>

<asp.table runat="server" gridlines="Both">


....snip

<tr>

<td colspan="2">

<asp:linkbutton id="Edit"

text="Edit"

commandname="Edit"

runat="server"/>

</td>
 
I should have said that I have an edit template but clicking Edit does not
open it.
I could show the entire code (it's a little long) if someone thinks they
could help if they saw it all.

<EditItemTemplate>

<asp.table id="t1" runat="server" gridlines="Both">


<tr>

<td>

<b>Email:</b>

</td>

<td>

<asp:textbox id="EmailUpdateTextBox"

text='<%# Bind("Email") %>'

runat...
 
Back
Top