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. 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. Jerry Tovar
    Replies:
    1
    Views:
    2,729
    Jim Cheshire [MSFT]
    Oct 23, 2003
  2. Arjen
    Replies:
    3
    Views:
    436
    Scott Allen
    Feb 27, 2005
  3. Wardie
    Replies:
    4
    Views:
    487
    Wardie
    Nov 8, 2006
  4. matt
    Replies:
    1
    Views:
    254
    George Ogata
    Aug 6, 2004
  5. Steven Taylor
    Replies:
    9
    Views:
    247
    Brian Candler
    Apr 27, 2009
Loading...

Share This Page