Attribute Variables

  • Thread starter Thread starter randy.buchholz
  • Start date Start date
R

randy.buchholz

Having trouble with something that (I think) should be simple.
I would like to use variables for attribute values but can't figure out how.
For example, I have a few gridviews with common fields (months of the year)
I would like to be able to set them all to the same width and be able to
adjust this. Styles don't work for this because I already have a style
assigned that is more important. I am getting stuck in two areas.
1) How can I declare a variable in the ASP (not .cs) page?
2) How can I assign this variable to an attribute? (ASP expects quoted
attribute values)

Basically I want to do:

b_width = "40px"

<asp:BoundField DataField="Jul" HeaderText="Jul" SortExpression="Jul" >
<ControlStyle Width=b_width />

</asp:BoundField>

Thanks
 
Back
Top