yeah, a literal seems to be a better way to go.
However, even after I switched it to that I'm still having problems
with how much HTML I'm allowed to post to the text property of the
literal. Is there some kinda of limit on how much data you can assign
to the text property?
Here's the specific effect I'm seeing.... I have a custom built seach
box which is simply a button and a text box which has an OnClick method
that uses Response.Redirect to redirect to a URL adding a query string.
On this results page I have a asp:Literal tag and I generate a bunuch
of HTML as strings into a string builder. After all my strings are
generated I say nameOfLiteral.Text = nameOfStringBuilder.ToString();
The page always shows the correct dynamically generated HTML so it
seems the data is getting into the text property of the Literal and
displayed on the page... however, when I don't have that much HTML
added to the Literal my search box works as normal, when I add much
more HTML to the literal control my search box stops working and
generates a scrip error in IE. So it seems as if the text is getting to
the literal ok but for some reason a lot of text as opposed to a little
breaks my page. Any suggestions on a fix for this?
sloan wrote:
asp:Literal
<ma******@gmail.com> wrote in message
news:11**********************@d56g2000cwd.googlegr oups.com... I'm currently work'n on a project where I'm dynamically generating some
HTML as text into a string builder. My ASP page has a <span> tag on it
and after I gernerate HTML to my string builder I concat all the
strings and set the span's innerHTML property to this output. What I'm
wondering is if this is the best way to do this or is there a better
method to take a bunch of strings and dump them out onto an ASP page so
it shows up as formatted HTML? Second of all, this method seems to work
fine when my text has a lower number of strings, if I have a lot of
strings however it outputs to the page correctly but strangely enough
other portions of my page stop working (like my seach box will no
longer work, this only happens with a high number of strings being
concat'ed though, like 100+)? Any insights would be appreciated!