Design Time Support

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zviki Goldberg

    Design Time Support

    Hi..

    I need to know in design time in ASP.NET inside a control (for ex), who is
    the Page that contain him. I tried to use the Pae property or the Parent
    property but they are NULL.
    I need tha page type or namr or something like that.

    Is it possible ??

    Thanks a lot

    Zviki.


  • Rick Strahl [MVP]

    #2
    Re: Design Time Support

    Zviki,

    I don't think so. The problem is that the page is basically a handler and
    the handler is not really running. the DesignTime is only simulating a page
    and firing off a few select events on each control (OnInit, Render
    specifically).

    Your best approach is most likely to check for designtime mode and dispay
    information specifically for that. You can do this by checking
    HttpContext.Cur rent for null - if it's null you're in design time.

    +++ Rick ---

    --

    Rick Strahl
    West Wind Technologies
    Home of Rick Strahl's company site. Find products, tools and development service, read our development blogs and white papers about Web and Service development on the Microsoft and open Web stack.

    Wind, Waves, Code and everything in between...

    ----------------------------------
    Making waves on the Web


    "Zviki Goldberg" <zvikig@matrix. co.il> wrote in message
    news:OIm3osQJEH A.556@tk2msftng p13.phx.gbl...[color=blue]
    > Hi..
    >
    > I need to know in design time in ASP.NET inside a control (for ex), who is
    > the Page that contain him. I tried to use the Pae property or the Parent
    > property but they are NULL.
    > I need tha page type or namr or something like that.
    >
    > Is it possible ??
    >
    > Thanks a lot
    >
    > Zviki.
    >
    >[/color]


    Comment

    • Zviki Goldberg

      #3
      Re: Design Time Support

      Hi

      I need to go the the resource of the ASP.NET page and update it in design
      time. Therefore, I need the page type or the page name which the control is
      in.

      Do you have maybe other ideas ??

      Thanks..
      Zviki

      "Rick Strahl [MVP]" <rickstrahl@hot mail.com> wrote in message
      news:ugJhLfaJEH A.1392@TK2MSFTN GP09.phx.gbl...[color=blue]
      > Zviki,
      >
      > I don't think so. The problem is that the page is basically a handler and
      > the handler is not really running. the DesignTime is only simulating a[/color]
      page[color=blue]
      > and firing off a few select events on each control (OnInit, Render
      > specifically).
      >
      > Your best approach is most likely to check for designtime mode and dispay
      > information specifically for that. You can do this by checking
      > HttpContext.Cur rent for null - if it's null you're in design time.
      >
      > +++ Rick ---
      >
      > --
      >
      > Rick Strahl
      > West Wind Technologies
      > http://www.west-wind.com/
      > http://www.west-wind.com/weblog/
      > ----------------------------------
      > Making waves on the Web
      >
      >
      > "Zviki Goldberg" <zvikig@matrix. co.il> wrote in message
      > news:OIm3osQJEH A.556@tk2msftng p13.phx.gbl...[color=green]
      > > Hi..
      > >
      > > I need to know in design time in ASP.NET inside a control (for ex), who[/color][/color]
      is[color=blue][color=green]
      > > the Page that contain him. I tried to use the Pae property or the Parent
      > > property but they are NULL.
      > > I need tha page type or namr or something like that.
      > >
      > > Is it possible ??
      > >
      > > Thanks a lot
      > >
      > > Zviki.
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...