Results 1 to 4 of 4

Thread: Subclassing a web page

  1. #1

    Thread Starter
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Subclassing a web page

    Can anyone explain to me how to subclass a webpage that someone else wrote with their codebehinds in C#?

    One company we are working with wrote a few web pages that call their API. I want to add a smidgen of new functionality to it, while maintaining the same look and feel. I was told that I could subclass their page, but I have no clue on where to start on this. I would like to write my page using VB.net code behind, but I can do C# if necessary.

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Subclassing a web page

    By "subclass" do you mean "derive from"?
    I don't live here any more.

  3. #3

    Thread Starter
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: Subclassing a web page

    I think thats right woss. They used the term subclass, so that is how I presented the issue here. What I want to be able to do is access some of the public (or protected) methods and variables they used in the code behind.

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Subclassing a web page

    you would be looking to inherit a page from that page

    in your standard code behind you usually have this
    Inherits System.Web.UI.Page
    so if you changed that to
    Inherits SomeProject.SomePage

    then you will inherit the page you want, which itself inherits from System.Web.UI.Page, so you get everything you need (this of course also needs to rely on the original programmer making everything accessable that you need to be)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width