Solved

Error in asp.net page

Posted on 2011-09-16
4
202 Views
Last Modified: 2012-05-12
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
Comment
Question by:zachvaldez
  • 2
4 Comments
 
LVL 2

Expert Comment

by:Lord_Death
ID: 36549296
you dont have the OnItemEditing="lvEmp_ItemEditing" event implemented in your code behind so maybe its deleted or , you forgot to create one.
0
 

Author Comment

by:zachvaldez
ID: 36549513
I have it also I'm code behind    
0
 
LVL 16

Accepted Solution

by:
disrupt earned 250 total points
ID: 36549659
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
 

Author Comment

by:zachvaldez
ID: 36551986
do you have a lvEmp_ItemEditing method? yes
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question