assign dynamic attributes in web controls in aspx file

Discussion in 'ASP .Net Web Controls' started by Diego, Jun 17, 2004.

  1. Diego

    Diego Guest

    I want to assign dynamic attributes in web controls but in the aspx file
    directly, is it posible or it works only in code behind??
    i thought the follwing code.....

    <asp:TextBox Runat=Server ID="dt45" ToolTip='<%="Test"%>'/>

    is it possible to do something like that?
     
    Diego, Jun 17, 2004
    #1
    1. Advertising

  2. Diego

    Fritz Guest

    Diego wrote:

    > I want to assign dynamic attributes in web controls but in the aspx file
    > directly, is it posible or it works only in code behind??
    > i thought the follwing code.....
    >
    > <asp:TextBox Runat=Server ID="dt45" ToolTip='<%="Test"%>'/>
    >
    > is it possible to do something like that?

    Look back at a long discussion a few steps back.
     
    Fritz, Jun 19, 2004
    #2
    1. Advertising

  3. Diego

    Fritz Guest

    Diego wrote:

    > I want to assign dynamic attributes in web controls but in the aspx file
    > directly, is it posible or it works only in code behind??
    > i thought the follwing code.....
    >
    > <asp:TextBox Runat=Server ID="dt45" ToolTip='<%="Test"%>'/>
    >
    > is it possible to do something like that?

    By the way, I don't think that you can write the <%= %> block inside a web
    server control.
     
    Fritz, Jun 19, 2004
    #3
  4. Server script inside server controls is not possible. Only databinding code
    is possible (<%#...%>). So, you'll have to recreate your attributes in the
    codebehind: Attributes.Add(string, string)... As Fritz said. check some
    earlier posts.

    --
    RobertK
    { Clever? No just smart. }

    "Fritz" <> wrote in message
    news:RfQAc.6485$...
    > Diego wrote:
    >
    > > I want to assign dynamic attributes in web controls but in the aspx file
    > > directly, is it posible or it works only in code behind??
    > > i thought the follwing code.....
    > >
    > > <asp:TextBox Runat=Server ID="dt45" ToolTip='<%="Test"%>'/>
    > >
    > > is it possible to do something like that?

    > By the way, I don't think that you can write the <%= %> block inside a web
    > server control.
     
    Robert Koritnik, Jun 21, 2004
    #4
  5. Diego

    Diego Guest

    "Robert Koritnik" <> escribió en el
    mensaje news:...
    > Server script inside server controls is not possible. Only databinding

    code
    > is possible (<%#...%>). So, you'll have to recreate your attributes in the
    > codebehind: Attributes.Add(string, string)... As Fritz said. check some
    > earlier posts.
    >
    > --
    > RobertK
    > { Clever? No just smart. }
    >
    > "Fritz" <> wrote in message
    > news:RfQAc.6485$...
    > > Diego wrote:
    > >
    > > > I want to assign dynamic attributes in web controls but in the aspx

    file
    > > > directly, is it posible or it works only in code behind??
    > > > i thought the follwing code.....
    > > >
    > > > <asp:TextBox Runat=Server ID="dt45" ToolTip='<%="Test"%>'/>
    > > >
    > > > is it possible to do something like that?

    > > By the way, I don't think that you can write the <%= %> block inside a

    web
    > > server control.

    >
    >


    Thanks, I understand how that works now :)
     
    Diego, Jun 21, 2004
    #5
    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. DKode
    Replies:
    1
    Views:
    1,891
    S. Justin Gengo
    Nov 12, 2003
  2. John M
    Replies:
    1
    Views:
    1,239
    Kumar Reddi
    May 29, 2005
  3. Ronald
    Replies:
    2
    Views:
    860
    Robbe Morris [C# MVP]
    Jan 17, 2006
  4. Denny Smolinski via .NET 247

    Dynamic Controls, Placeholder, Retrieve Information from Dynamic Controls

    Denny Smolinski via .NET 247, May 4, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    484
    Eidolon
    May 4, 2004
  5. DCV via .NET 247

    assign dynamic attributes in web controls in aspx file

    DCV via .NET 247, Jun 17, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    145
    DCV via .NET 247
    Jun 17, 2004
Loading...

Share This Page