|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Any way to set attributes for server controls by referencing properties/methods/variables?I'm trying to find a declarative way to set server control attributes using the attribute="<%= SomeValue %>" syntax. This works fine for basic HTML controls, but server controls will literally display the contained text, but won't execute the containing code. It works fine if I use the attribute="<%# SomeValue %>" syntax and calling DataBind() in the code behind, but this feels really ugly. Other than just setting the attribute in the code behind, is there a better way to do this? Any help would be appreciated. Thanks, Paul I would be interested to see what other have to say on this myself.
At the moment the best way I've found to do this is from the Code Behind page. Steve
WebParts without SharePoint
How to format wizard? ReportViewer Causing Major Problems Render web custom control Dropdownlist selected value Self populating UserControl Self populating UserControl Dropdown in webpart lost its state after postback Urgent: NullReferenceException on RenderControl method of TreeView Set NextPageText and PreviousPageText Runtime |
|||||||||||||||||||||||