I appreciate your help, unfortunately, I need multiple images within the container and one of them needs to be different depending on if the RightPane is visible or not.
I did find a solution, however. I am curious if there is any advice against it or not so I'm posting my solution below.
1. Use server side code to check if the pane contains the class "DNNEmptyPane".
2. Use an event from a server side pane that comes after the pane you are checking. (I added a "dummy" pane called "BottomPane" that is my final pane and therefore using it's event's to check the previous panes class names.)
3. Create and add an HtmlLink to the page.
Protected Sub BottomPane_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim value As String = RightPane.Attributes("Class").Contains("DNNEmptyPane").ToString & _
LeftPane.Attributes("Class").Contains("DNNEmptyPane").ToString
Dim link As HtmlLink = New HtmlLink
link.ID = value
Select Case value
Case "TrueTrue"
link.Attributes.Add("href", "~/Portals/0/Skins/CB Deco 1.5/css/RS.css")
Case "FalseTrue"
link.Attributes.Add("href", "~/Portals/0/Skins/CB Deco 1.5/css/RS-R.css")
Case "TrueFalse"
link.Attributes.Add("href", "~/Portals/0/Skins/CB Deco 1.5/css/RS-L.css")
Case "FalseFalse"
'Me.BottomPane.Visible = False
Exit Sub
End Select
link.Attributes.Add("type", "text/css")
link.Attributes.Add("rel", "stylesheet")
Me.Page.Header.Controls.Add(link)
'Me.BottomPane.Visible = False
End Sub
If you dont want the BottomPane to appear during the design time of the site then uncomment the last line.