0
votes

This has got to be one of the most frustrating issues with asp.net. I first got the error parser error cannot load default and as I have done before checked if the naming was correct in th bin folder and made the changes accordingly. Now I get the following error:

somethiing._DEfault is not allowed here because it does not extend class 'System.Web.UI.Page'

where something is the name of the project in the properties. I have the following code in Default:

Namespace FormDiscovery



Partial Class _Default
    Inherits System.Web.UI.Page


    Shared settings As New System.Configuration.AppSettingsReader
    Shared connObj_Generic As New SqlConnection
    Shared commObj_Generic As New SqlCommand

    Shared count As Integer
    Shared num As Integer

     etc..

Now I have deleted the project and other in the solution and created a new one and still this error and if I take the 'something' name away I get the cannot load default error.

1
This isn't about your issue, but I'm 100% sure that you do not want to be declaring those variables as shared.womp

1 Answers

2
votes

Seems to me like a problem with inheritance, have a look at this:

http://www.west-wind.com/Weblog/posts/3016.aspx

HTH