Conditional HTML Building

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Demetri

    #1

    Conditional HTML Building

    Lets say I want the page to build a certain way based on a
    querystring value and I need to do it within the HTML
    (aspx not cs file).

    In classic asp using vb I could do something like:

    <%if request.queryst ring("msg") = "hello"%>
    <div>Hello world</div>
    <%else%>
    <div>No message</div>
    <%end if%>

    What would be the equivalent (translate it) of that in C#?
  • S. Justin Gengo

    #2
    Re: Conditional HTML Building

    Demetri,

    Look up the "Literal" control.

    I think it may help you with this type of thing.

    Sincerely,

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzche


    "Demetri" <Reject@spam.co m> wrote in message
    news:0ab801c35c e4$4498cf70$a50 1280a@phx.gbl.. .[color=blue]
    > Lets say I want the page to build a certain way based on a
    > querystring value and I need to do it within the HTML
    > (aspx not cs file).
    >
    > In classic asp using vb I could do something like:
    >
    > <%if request.queryst ring("msg") = "hello"%>
    > <div>Hello world</div>
    > <%else%>
    > <div>No message</div>
    > <%end if%>
    >
    > What would be the equivalent (translate it) of that in C#?[/color]


    Comment

    Working...