Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

Error in asp.net page

I got this error  on the page when I run this code...

<asp:ListView ID="lvEmp"
   DataKeyNames="TID"
   runat="server"
   OnItemEditing="lvEmp_ItemEditing"
   OnItemUpdating="lvEmp_ItemUpdating"
   OnItemCanceling="lvEmp_ItemCanceling"
   OnItemDeleting="lvEmp_ItemDeleting"
   InsertItemPosition="LastItem"
   OnItemInserting="lvEmp_ItemInserting">

I received this errror
 'lvEmp_ItemEditing' is not a member of 'ASP.webform1_aspx'

however if I comment out it like the lines, it worked ok. What could be the reason?


<asp:ListView ID="lvEmp"
   DataKeyNames="TID"
   runat="server">
  <%- OnItemEditing="lvEmp_ItemEditing"
   OnItemUpdating="lvEmp_ItemUpdating"
   OnItemCanceling="lvEmp_ItemCanceling"
   OnItemDeleting="lvEmp_ItemDeleting"
   InsertItemPosition="LastItem"
   OnItemInserting="lvEmp_ItemInserting--%>>
0
zachvaldez
Asked:
zachvaldez
  • 2
1 Solution
 
Lord_DeathCommented:
you dont have the OnItemEditing="lvEmp_ItemEditing" event implemented in your code behind so maybe its deleted or , you forgot to create one.
0
 
zachvaldezAuthor Commented:
I have it also I'm code behind    
0
 
disruptCommented:
See this working example:

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listview.itemediting.aspx

do you have a lvEmp_ItemEditing method?
0
 
zachvaldezAuthor Commented:
do you have a lvEmp_ItemEditing method? yes
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now