Error in resolving server side tag
<p>Invalid expression term '&lt;'</p>

<pre><code>&lt;asp:TextBox ID="txtPassword" runat="server" 
            Width="180px" TextMode="Password" 
            OnTextChanged="CheckPasswordStrength(&lt;%= txtPassword.ClientID.ToString() %&gt;,&lt;%= lblMessage.ClientID.ToString() %&gt;)"/&gt;
</code></pre>

<p>If i writes this code like the following then error occurs An unhandled exception has occured. Server tags cannot contain &lt;% %> constructs</p>

<pre><code>  &lt;asp:TextBox ID="txtPassword" runat="server" 
                Width="180px" TextMode="Password" 
                OnTextChanged="CheckPasswordStrength("&lt;%= txtPassword.ClientID.ToString() %&gt;","&lt;%= lblMessage.ClientID.ToString() %&gt;")"/&gt;
</code></pre>

<p>When I m using this code at .cs file then every thing is working fine.</p>

<pre><code> protected void Page_Load(object sender, EventArgs e)
    {
        txtPassword.Attributes.Add("onKeyUp", "PasswordCheck("+txtPassword.ClientID.ToString()+")");
        txtPrimaryEmail.Attributes.Add("onKeyUp", "EmailChecker("+txtPrimaryEmail.ClientID.ToString()+")");
    }
</code></pre>
