How to use if or try catch block inside server tag
<p>I am wondering if it is possible to use an if statement or a try catch block within a server tag? ie:</p>

<pre><code>'&lt;%= if(grid!=null){((DropDownList)this.grid.FindControl("SRPType")).ClientID} %&gt;'
</code></pre>
