ASP 3.0 Passing HTML to ASP.NET 1.1

R

Ryan Ternier

I have an ASP page that needs to pass a string object full of HTML to a .NET
iframe within that page.

The String might be over 5000 characters of HTML.

Reason we're doing this is to incorporate our HTML editor in our Portal
Software. Currently it works perfect with regular strings, but once you get
a well formed XHTML document in there, it bombs out.

This is what I'm currently using:

<iframe width="100%" height="88%"
src="ContentEditor.aspx?Content=<%=strContentBody%>"></iframe>

I also tried:

<iframe width="100%" height="88%"
src="ContentEditor.aspx?Content=<%=Server.HTMLEncode(strContentBody)%>"></iframe>

But both generate errors on the .NET side:

A potentially dangerous Request.QueryString value was detected from the
client (Content="<TABLE cellSpacing=0..."). .



Any help would be greatly appreciated. I want to get this done before I
leave for Christmas holidays.
 
B

Bruce Barker

you have two problems.

1) by default asp.net does not allow "<"'s inside a form variable. disable
Request validation for the page.
2) the max length of a url is 2k

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top