Newbie: how to handle large response.write blocks

Discussion in 'ASP .Net' started by Brian F, Mar 15, 2006.

  1. Brian F

    Brian F Guest

    Hi everyone -

    Is there a way to abbreviate the aspx below? Specifically, is there a
    way to eliminate the response.write syntax and escaped characters?

    <%
    if (MyObject.SomeBoolean)
    {
    Response.Write("<div class=\"myclass\">");
    Response.Write("You may have won 1,000,000 dollars...");
    Response.Write("lots of text...");
    Response.Write("lots of text...");
    Response.Write("</div>");
    }
    else
    {
    Response.Write("<div class=\"error\">");
    Response.Write("You should buy more magazines...");
    Response.Write("lots of text...");
    Response.Write("lots of text...");
    Response.Write("</div>");
    }
    %>

    Thanks.
    Brian
    Brian F, Mar 15, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ryan Hartman

    large files via Response.OutputStream.Write

    Ryan Hartman, Nov 4, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    7,286
    Ryan Hartman
    Nov 11, 2003
  2. Arjen
    Replies:
    3
    Views:
    429
    Scott Allen
    Feb 27, 2005
  3. Jack
    Replies:
    2
    Views:
    89
  4. matt
    Replies:
    1
    Views:
    244
    George Ogata
    Aug 6, 2004
  5. Steven Taylor
    Replies:
    9
    Views:
    240
    Brian Candler
    Apr 27, 2009
Loading...

Share This Page