M
Monty
Hi, I have a user control in which I set some style properties
programmatically, like so:
divMain.Style.Add("width", Me.PixelWidth.ToString & "px")
Dim iInnerWidth As Integer = Me.PixelWidth - 2
ddlCategory.Style.Add("width", iInnerWidth.ToString)
ddlLocation.Style.Add("width", iInnerWidth.ToString)
I've tried setting these style attributes during the page_load and
page_prerender events of the user control, but for some reason the styles do
not seem to be applied until there has been a postback on the page, and
suddenly everything "pops" to the correct width. What am I missing here?
Thanks in advance...
Monty
programmatically, like so:
divMain.Style.Add("width", Me.PixelWidth.ToString & "px")
Dim iInnerWidth As Integer = Me.PixelWidth - 2
ddlCategory.Style.Add("width", iInnerWidth.ToString)
ddlLocation.Style.Add("width", iInnerWidth.ToString)
I've tried setting these style attributes during the page_load and
page_prerender events of the user control, but for some reason the styles do
not seem to be applied until there has been a postback on the page, and
suddenly everything "pops" to the correct width. What am I missing here?
Thanks in advance...
Monty