with an asp : panel it automatically renders an html div box or table.
is there a way to stop the panel rendering any html?
with an asp : panel it automatically renders an html div box or table.
is there a way to stop the panel rendering any html?
Run the contents through HttpUtility.HtmlEncode should stop that.
Warren Ashcroft
Red Fox UK Limited - Pioneers in Internet Technology
http://www.redfoxuk.com
w.ashcroft [at] redfoxuk.com
NOTE: Forum Private Messaging should not be used to contact staff with support queries.
Warren Ashcroft
Red Fox UK Limited - Pioneers in Internet Technology
http://www.redfoxuk.com
w.ashcroft [at] redfoxuk.com
NOTE: Forum Private Messaging should not be used to contact staff with support queries.
Use a contentplaceholder instead of a panel as it doesn't render in a div.
have you had a look at the new CSS friendly control adapters?
http://www.asp.net/cssadapters/
Josh
You could also create your own Control that inherits from the base control. This could then override the Render method.
A nice side effect of this ssee if the Panel has contents, and if so you render the panel as a DIV or TABLE (ie. base.Render). However, if the Panel doesn't have any contents then it could render nothing leaving the output Html / XHtml much cleaner.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks