Using VS 2010 and .net 4.0 framework. I am getting the error below when I open my code-behind page that contains a ListView control. Below the error is the code where it is occurring and the code in the editor shows underlines everywhere that the ListView or
events is referenced. How can I resolve or what else can I give to help resolve this? Thanks. 'lvJobSetupSelections' is not declared. It may be inaccessible due to its protection level. Protected Sub lvJobSetupSelections_ItemCanceling(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.ListViewCancelEventArgs) Handles lvJobSetupSelections.ItemCanceling lvJobSetupSelections.InsertItemPosition = InsertItemPosition.None End Sub
hi dlchase89 ,
From what I understand you come across the issue that 'lvJobSetupSelections' is not declared when you use
ListView Control.
It was becuase you had renamed a copy of the *.aspx file and which still using the newer versions code behind file. The code behind file was looking for “lvJobSetupSelections“ ,but on the older version of the *.aspx file “lvJobSetupSelections“ didn’t exist!
I would suggest you to exclude the older version of the page from the project and then it appears to run ok .
If you need more assistance ,please let me know.
Actually, I am geting this error on multiple pages, all with a ListView control. This is just a hunch but is it due to something in the web.config file? This website project was upgraded from 3.5 to 4.0 framework using VS 2010.
hi dlchase89,
if you don't want to delete older version page and re-create new .
i would suggest you to try the following link to alter web.config file:
http://forums.asp.net/t/1925542.aspx/
i hope it helps you.
I decided to publish my web.config file (except for secure items) to see if anyone finds something out of order since I am getting the error on every page that has a ListView. Note this website project was in .net 3.5 and we converted to .net 4.0
I think I isolated the problem. I started rebuilding the website from scratch and in the new web.config file it created the following entry inside the
I imported web pages from the old site that have ListViews I did not get the error. However, when I try to run the website from IIS it throws an exception as shown below. I think I am closer but still need some expert guideance. How can I get IIS to work with
the targetFramework="4.0" setting? The website is running under an app pool for .net 4.0 Exception message: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET
Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the
hi dlchase89,
From what I understand you want to import the xml data into the Excel file, and mapping it to Excel fields.
I would suggest you to try the follow setting:
Select your website in IIS => Basic Settings => Application Pool => Select
.NET Framework Version4.0.
Please read the reference below for more information:
If you need more assistance ,please let me know.
The App Pool is already at 4.0, thanks.
hi dlchase89,
From what i understand that your web.config is right but i don't kown that your last issue.
can you tell me your error message in oder to understand you issue better.
I was getting a "ListView is not declared" error on every page in the application that contained a ListView control. I solved it (for now, but not really sure why) by entering a
an article about manually configuring your web.config for going from 3.5 to 4.0 and the article indicated removal of this section.
沒有留言:
張貼留言