Variable in a control (very basic question)

Discussion in 'ASP .Net' started by Vincent Courcelle, Aug 3, 2006.

  1. Hello,
    My question is very basic but I can't find an answer on search engines
    for it.
    How can I "pass" a variable to a control in a non programmatic way
    (directly in the .aspx file, not through the .aspx.cs file) ?

    For example :
    <asp:Login ID="LoginUser" runat="server" TitleText=""
    InstructionText="<%=Resources.Resource.MyVariable %>"
    Width="100%"></asp:Login>

    This prints me "<%=Resources.Resource.MyVariable %>" for my login
    instruction (not the value it refers to).

    Thanks :)
     
    Vincent Courcelle, Aug 3, 2006
    #1
    1. Advertising

  2. Vincent why don't you want to do it in the codebehind.
    And by the what is InstructionText="<%=Resources.Resource.MyVariable %>?
    what are u trying to return in the using the login control??
    Patrick

    "Vincent Courcelle" <> wrote in message
    news:...
    > Hello,
    > My question is very basic but I can't find an answer on search engines for
    > it.
    > How can I "pass" a variable to a control in a non programmatic way
    > (directly in the .aspx file, not through the .aspx.cs file) ?
    >
    > For example :
    > <asp:Login ID="LoginUser" runat="server" TitleText=""
    > InstructionText="<%=Resources.Resource.MyVariable %>"
    > Width="100%"></asp:Login>
    >
    > This prints me "<%=Resources.Resource.MyVariable %>" for my login
    > instruction (not the value it refers to).
    >
    > Thanks :)
     
    Patrick.O.Ige, Aug 3, 2006
    #2
    1. Advertising

  3. Patrick.O.Ige a écrit :
    > Vincent why don't you want to do it in the codebehind.
    > And by the what is InstructionText="<%=Resources.Resource.MyVariable %>?
    > what are u trying to return in the using the login control??
    > Patrick


    Hello,
    I'm trying to localize a website.
    As I never put my sentences like "Hello world" in the codebehind, I
    would like this not to be in the code behind too, which is much more
    logic (split between code and presentation/sentences must stay).
    I simply would like to print a langage aware instruction string in my
    login control, I think the way to pass any variable content to a control
    would be the same (I took the example of a localized resources, replace
    my example with any string variable).

    Thanks :)
     
    Vincent Courcelle, Aug 3, 2006
    #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. Raymond Arthur St. Marie II of III

    very Very VERY dumb Question About The new Set( ) 's

    Raymond Arthur St. Marie II of III, Jul 23, 2003, in forum: Python
    Replies:
    4
    Views:
    486
    Raymond Hettinger
    Jul 27, 2003
  2. aghazalp

    very very basic question

    aghazalp, Apr 2, 2006, in forum: Python
    Replies:
    6
    Views:
    347
    aghazalp
    Apr 2, 2006
  3. shanx__=|;-

    very very very long integer

    shanx__=|;-, Oct 16, 2004, in forum: C Programming
    Replies:
    19
    Views:
    1,641
    Merrill & Michele
    Oct 19, 2004
  4. Peter

    Very very very basic question

    Peter, Feb 8, 2005, in forum: C Programming
    Replies:
    14
    Views:
    521
    Dave Thompson
    Feb 14, 2005
  5. mdh

    A very **very** basic question

    mdh, Sep 25, 2008, in forum: C Programming
    Replies:
    57
    Views:
    1,243
    August Karlstrom
    Sep 26, 2008
Loading...

Share This Page