Solved

Error in asp.net page

Posted on 2011-09-16
4
206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

627 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