set server control property in markup using server side variable, even just a constant, is that poss

Discussion in 'ASP .Net' started by Ryan Liu, Feb 21, 2009.

  1. Ryan Liu

    Ryan Liu Guest

    Hi,

    I'd like to set server control property, like SortExpression to a var like
    public const string NAME = "name";

    and this const can be used cross applicatoin to avoid typing error, is that
    possible?

    I know <asp:BoundField DataField="Name" SortExpression
    ="<%=Constant.NAME%>"> or
    <SortExpression ="<%#Constant.NAME%>">
    won't work.

    Thanks,
    Ryan
     
    Ryan Liu, Feb 21, 2009
    #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. mehul raval

    poss soln

    mehul raval, Mar 4, 2004, in forum: C Programming
    Replies:
    3
    Views:
    420
    Joona I Palaste
    Mar 4, 2004
  2. Robert Wells
    Replies:
    4
    Views:
    687
    Default User
    Jun 24, 2008
  3. Andy Fish
    Replies:
    1
    Views:
    231
    Andy Fish
    Oct 27, 2004
  4. TJ
    Replies:
    4
    Views:
    378
    Steven Cheng[MSFT]
    Apr 7, 2006
  5. Dave Rado
    Replies:
    1
    Views:
    108
    Dave Rado
    May 8, 2008
Loading...

Share This Page