Conditional HTML Building

  • Thread starter Thread starter Demetri
  • Start date Start date
D

Demetri

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.querystring("msg") = "hello"%>
<div>Hello world</div>
<%else%>
<div>No message</div>
<%end if%>

What would be the equivalent (translate it) of that in C#?
 
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
 

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

Back
Top