"Binod Nair" <na*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
John thanks a lot
The problem was here
I HAD IT AS
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="TestVBWebApp.BaseRequestHandler "%>
AND NOT LIKE WHAT John said
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="TestVBWebApp.WebForm1"%>
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.vb contains your codebehind class. It would declare a class
called WebForm1 in the TestVBWebApp namespace. The WebForm1 class inherits
from System.Web.UI.Page. So you have the following:
ASPX_WebForm1 ==> TestVBWebApp.WebForm1 ==> System.Web.UI.Page
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="System.Web.UI.Page". That is:
ASPX_WebForm1 ==> System.Web.UI.Page
As an example of when the Inherits in the codebehind would be different is a
situation like yours:
ASPX_WebForm1 ==> TestVBWebApp.WebForm1 ==> TestVBWebApp.BaseRequestHandler
==> System.Web.UI.Page
Note that in this case, you still need the Inherits="TestVBWebApp.WebForm1",
since that's the class which ASPX_WebForm1 inherits directly from.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com