Inherit and Scoping Problem? RRS feed

  • Question

  • User-55569844 posted

    I've run into my first (and, so far, ONLY) experience with ALL variables presumably defined on a ".aspx" not being "known" in the corresponding ".aspx.vb" and am completely stumped.

    ALL of the identifiers defined on the Default.aspx seem to be "missing" and unknown in the corresponding :.aspx.vb". Here are the beginnings of both files:


    <%@ Page Language="VB" MasterPageFile="Default.master" AutoEventWireup="false" 
        CodeFile="Default.aspx.vb" Inherits="_Default" title="my title" %>


    Partial Class _Default
        Inherits System.Web.UI.Page

    The error messages (for EVERY control referenced in the ".aspx.vb" is:

    Error	22	Name 'lblSignOff' is not declared.	D:\$$$AAA_VISUAL_WEB_DEVELOPER\TKOC_v0\Default.aspx.vb	112	13	D:\$$$AAA_VISUAL_WEB_DEVELOPER\TKOC_v0\


    I'm clueless and I've even taken the source code and carefully reconstructed the various "div"s to triple check that everything is correcly balanced and correct. Any ideas or experience will this gratefully appreciated!

    :)  KevInKauai

    Friday, September 19, 2008 6:13 PM

All replies

  • User-324533553 posted

    try removing the master page ref MasterPageFile="Default.master" from your page directive and try


    Friday, September 19, 2008 7:50 PM
  • User-55569844 posted

    Thanks, etariq. You can't just remove the MasterPageFile (as that supplies an outer structure) but I did the rough equivalent by creating a new form without a MasterPageFile and copying in the non-MasterPage contents of both the aspx and aspx.vb and the errors go away.

    Do this mean that there is a "containing error" (in the MasterPage elements) that is the real culprit? I need the master page or is this a name clash of "Default.master". (Interestingly, I first created a new form aspx/aspx.vb pair called "Try" -- giving me "Try.aspx" and "Try.aspx.vb" and ran into an apparently clash with the keyword "Try" there until I appended it to "TryFix".)

    Where do I look to get me a solution to what seems to be oddly "environmental" or "context dependent"?

    All suggestions gratefully received!

    :)  KevInKauai

    Friday, September 19, 2008 8:43 PM
  • User-324533553 posted

    well am not sure whats the real couz of the error form your explanation , but i just want you to test what i posted and see if am getting it right [:S] any way hope this will help you and i hope am getting

    your problem



    Friday, September 19, 2008 8:48 PM