"Binod Nair" <na*******@hotm ail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
John thanks a lot
The problem was here
I HAD IT AS
<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="Web Form1.aspx.vb" Inherits="TestV BWebApp.BaseReq uestHandler "%>
AND NOT LIKE WHAT John said
<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="Web Form1.aspx.vb" Inherits="TestV BWebApp.WebForm 1"%>
It doesnt make sense to me why it needs to be like this ..Shouldnt it be
like the way i had declared..
John can u share ur thoughts about this.Also can u give an example when
the inherits value in "<%@ Page Language.." is going to be different.
Here's the way it "normally" works when a CodeBehind page is used. You've
got page WebForm1.aspx. This is parsed and compiled into a class with a
generated name, like, ASPX_WebForm1. This class inherits from the class
mentioned in the Inherits attribute in the Page directive.
WebForm1.aspx.v b contains your codebehind class. It would declare a class
called WebForm1 in the TestVBWebApp namespace. The WebForm1 class inherits
from System.Web.UI.P age. So you have the following:
ASPX_WebForm1 ==> TestVBWebApp.We bForm1 ==> System.Web.UI.P age
An example of when this would be different is in the case where codebehind
is not used. In that case, the Inherits attribute says
Inherits="Syste m.Web.UI.Page". That is:
ASPX_WebForm1 ==> System.Web.UI.P age
As an example of when the Inherits in the codebehind would be different is a
situation like yours:
ASPX_WebForm1 ==> TestVBWebApp.We bForm1 ==> TestVBWebApp.Ba seRequestHandle r
==> System.Web.UI.P age
Note that in this case, you still need the Inherits="TestV BWebApp.WebForm 1",
since that's the class which ASPX_WebForm1 inherits directly from.
--
John Saunders
Internet Engineer
jo***********@s urfcontrol.com