added 'onclick' event to asp:button now receiving web.config unrecognized 'type' error
I have a site running in .net 2.5, I just added an onclick event to a asp:button and now i am getting an 'unrecognized attribute type' error on this line in the config file:
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
My error was typing in a function rather than letting the system 'auto' add it, and I forgot the 'protected' keyword, so the function became private and that was what was causin开发者_运维问答g the error - another one of those really unhelpful Microsoft errors.
Any ideas how to resolve this?
I think you are referring to .Net 2.0.
Regarding the error you are getting, this could be because of the IIS is running under .Net 1.1. Change it to run under ASP.Net 2.0 or higher.
You can change it as follows:
1) Right click on the Root/Virtual Directory
2) Click ASP.Net tab
3) Select the appropriate version from the drop down and click OK.
精彩评论