Results 1 to 3 of 3

Thread: sub main , aspx.net project, is it possible?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227

    sub main , aspx.net project, is it possible?

    hi,

    is it possible to have a aspx project with one module file , which is the startup of the project, and several webforms, in the module for example get the query string value and from there depending on program logic decide which webform to show????

    i know we can create a aspx project , then redirect to other projects from it, but if what i mentioned is possible it would be much better ( at least in my case ) because the hole thing will be packed together ,and is easy to deploy

    thanks,

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    No, you can't use a sub main. The reason is the browser has to request an object from the server, this can be a page, image, web service, etc, but it has to be something tangible that it is allowed access to. A module is NOT something the browser is able to get.

    Now, the best way to do this, would be to create a custom server control. You can put all your logic in the control, and include the control on each page you build. That would be one way.

    Another way would be to use the Global.asax class. This class provides events that could also possibly help you out in this senerio.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    thanks, i'll try the custom server control

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