Reference directive when loading web user controls dynamically

Discussion in 'MCAD' started by Lionel Orellana, Feb 7, 2005.

  1. Hi all,

    Kalani's book for 70-315, pages 572-573, talks about the
    Reference directive when you want to load a web user
    control dynamically:

    "The Reference page directive adds a reference by using the
    Control attribute that specifies the path to the user control"

    "Add a Reference page directive to indicate to the user
    control that ASP .NET should dynamically compile and link
    the user control with the current page"

    It sounds like this is something you MUST do to load user
    control dynamically. However, I've loaded controls without
    using this Reference directive and it all works fine. I
    tested it again and I didn't get any errors for omitting
    this directive.

    So is it really needed? What does it do for you, given that
    I don't put it in and it all works? Maybe it's only for
    when you use your control in a particular way or if you do
    something with it that I'm not.

    Any help appreciated ...

    Cheers
    L.
     
    Lionel Orellana, Feb 7, 2005
    #1
    1. Advertising

  2. Lionel Orellana

    NIL Guest

    Have you tried using 2 machines, one for your web server
    and one for your client? Results could be different you
    know.


    >-----Original Message-----
    >Hi all,
    >
    >Kalani's book for 70-315, pages 572-573, talks about the
    >Reference directive when you want to load a web user
    >control dynamically:
    >
    >"The Reference page directive adds a reference by using

    the
    >Control attribute that specifies the path to the user

    control"
    >
    >"Add a Reference page directive to indicate to the user
    >control that ASP .NET should dynamically compile and link
    >the user control with the current page"
    >
    >It sounds like this is something you MUST do to load user
    >control dynamically. However, I've loaded controls without
    >using this Reference directive and it all works fine. I
    >tested it again and I didn't get any errors for omitting
    >this directive.
    >
    >So is it really needed? What does it do for you, given

    that
    >I don't put it in and it all works? Maybe it's only for
    >when you use your control in a particular way or if you do
    >something with it that I'm not.
    >
    >Any help appreciated ...
    >
    >Cheers
    >L.
    >
    >
    >
    >
    >
    >
    >
    >
    >.
    >
     
    NIL, Feb 8, 2005
    #2
    1. Advertising

  3. I just did that ... it also worked ...

    >-----Original Message-----
    >
    >Have you tried using 2 machines, one for your web server
    >and one for your client? Results could be different you
    >know.
    >
    >
    >>-----Original Message-----
    >>Hi all,
    >>
    >>Kalani's book for 70-315, pages 572-573, talks about the
    >>Reference directive when you want to load a web user
    >>control dynamically:
    >>
    >>"The Reference page directive adds a reference by using

    >the
    >>Control attribute that specifies the path to the user

    >control"
    >>
    >>"Add a Reference page directive to indicate to the user
    >>control that ASP .NET should dynamically compile and link
    >>the user control with the current page"
    >>
    >>It sounds like this is something you MUST do to load user
    >>control dynamically. However, I've loaded controls without
    >>using this Reference directive and it all works fine. I
    >>tested it again and I didn't get any errors for omitting
    >>this directive.
    >>
    >>So is it really needed? What does it do for you, given

    >that
    >>I don't put it in and it all works? Maybe it's only for
    >>when you use your control in a particular way or if you do
    >>something with it that I'm not.
    >>
    >>Any help appreciated ...
    >>
    >>Cheers
    >>L.
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>.
    >>

    >.
    >
     
    Lionel Orellana, Feb 9, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Theodore Frank

    dynamically assigning NAT pool?

    Theodore Frank, Aug 9, 2004, in forum: Cisco
    Replies:
    1
    Views:
    494
  2. Guest

    dynamically updating a word document

    Guest, Sep 16, 2004, in forum: Computer Support
    Replies:
    1
    Views:
    472
    Mikish
    Sep 16, 2004
  3. krish200
    Replies:
    1
    Views:
    2,257
    fred5152
    Dec 18, 2007
  4. nkamalraj
    Replies:
    1
    Views:
    890
    unholy
    May 28, 2006
  5. thingy
    Replies:
    0
    Views:
    353
    thingy
    Nov 6, 2006
Loading...

Share This Page