In our asp.net project, we have a group of forms that have a solid color background and another that needs a background image. We have an if statement on our masterpage that tells us what forms we are on:
If Request.RawUrl.ToLower.Contains("shoes") Then
lblSection.Text = "Shoe Store"
ElseIf Request.RawUrl.ToLower.Contains("pants") Then
lblSection.Text = "Pant Store"
End If
How can I change the background image when im in the pants section? Or should I aproach this in a different way?
One option would be to turn the
<body>tag into a server controlled tag.e.g.
Then in your masterpage code, you could add a
classto this depending on the page.Then in your css you can have different backgrounds depending on the class name