Solved

Error in asp.net page

Posted on 2011-09-16
4
198 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
Comment Utility
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
Comment Utility
I have it also I'm code behind    
0
 
LVL 16

Accepted Solution

by:
disrupt earned 250 total points
Comment Utility
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
Comment Utility
do you have a lvEmp_ItemEditing method? yes
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now