Setting properties of a page in the aspx file without using code blocks

Discussion in 'ASP .Net' started by Achim Domma, Aug 7, 2007.

  1. Achim Domma

    Achim Domma Guest

    Hi,

    I have an aspx file which inherits from a class "MyPageClass" which
    has a property "MyProperty". I want to set MyProperty in the aspx
    file, but code blocks are not allowed in my environment (sharepoint).
    I tried something like

    <% @Page ... MyProperty="abc" %>

    which does not work. If code blocks would be allowed the following
    would work:

    <% MyProperty = "abc"; %>

    Is there an alternativ syntax to set the property? I don't see a
    reason why this should not be possible, because it's quite normal to
    set properties of controls in the aspx page. So why not for the page
    too?

    regards,
    Achim
     
    Achim Domma, Aug 7, 2007
    #1
    1. Advertisements

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. Jerry Tovar
    Replies:
    1
    Views:
    2,955
    Jim Cheshire [MSFT]
    Oct 23, 2003
  2. John Hamm
    Replies:
    0
    Views:
    530
    John Hamm
    Nov 19, 2003
  3. MadHatter51
    Replies:
    1
    Views:
    1,125
    Hakan Lambracht
    May 17, 2006
  4. Laith Zraikat
    Replies:
    3
    Views:
    1,444
    Walter Wang [MSFT]
    Jul 6, 2006
  5. Wardie
    Replies:
    4
    Views:
    725
    Wardie
    Nov 8, 2006
  6. William Youngman
    Replies:
    3
    Views:
    814
    William Youngman
    Apr 2, 2007
  7. Dave
    Replies:
    7
    Views:
    443
    Andy Gaskell
    May 11, 2004
  8. matt
    Replies:
    1
    Views:
    472
    George Ogata
    Aug 6, 2004
Loading...