How to use if statement inside HTML code in ASP.NET application?

Code

 

<table cellpadding="0" cellspacing="0" border="0" width="900px">

  <% if (m_GlobalVariable == "2") %>

  <% { %>

    <tr valign="top">

        <td align="right">My Condition1 :</td>

     </tr>

 <% } %>

</table>

 

Note: m_GlobalVariable is a global variable which I have declared in pagebehind and assigned the value in pageload.

Ebook Download
View all
Learn
View all