assign dynamic attributes in web controls in aspx file

D

Diego

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?
 
F

Fritz

Diego said:
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.
 
F

Fritz

Diego said:
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.
 
R

Robert Koritnik

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.
 
D

Diego

Robert Koritnik said:
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.

Thanks, I understand how that works now :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top