title: ASP.NET Usercontrol Property value does not run <%= markup
body: <p>Well i have a usercontrol with a property "ClientScript" and in the aspx file where i use the usercontrol i set the value to <code>=document.getElementsByName('&lt;%=ReportViewer1.ClientId %&gt;$ctl01$ctl07$ctl00$ctl00$ctl00')[0].click(); return false;</code></p>
  
  <p>the problem here is that the is litterly passed to the property and not parsed first and replaced by the ClientID..</p>
  
  <p>I had the same clientscript applied to a buttons OnClientClick and there it worked...</p>
  
  <p>Must i apply some sort of attribute to the property to get this working?</p>
  
  <p>here is my code:</p>
  
  <p>Usercontrol.ascx.vb</p>
  
  <pre><code>&lt;ParseChildren(True), PersistChildren(False), Themeable(False)&gt;
  Public Class CommandPanel
      Inherits System.Web.UI.UserControl
  
      Private mClientScript as string
      &lt;Themeable(False), DefaultValue("")&gt; _
      Public Property ClientScript As String
          Get
              Return mClientScript
          End Get
          Set(ByVal value As String)
              mClientScript = value
          End Set
      End Property
  End Class
  </code></pre>
  
  <p>Page.aspx</p>
  
  <pre><code>&lt;%@ Register src="UserControls/CommandPanel.ascx" tagname="CommandPanel" tagprefix="uc1" %&gt;
  ......
  &lt;uc1:CommandPanel ID="CommandPanel1" runat="server" ClientScript="document.getElementsByName('&lt;%= ReportViewer1.ClientId %&gt;$ctl01$ctl07$ctl00$ctl00$ctl00')[0].click(); return false;" /&gt;
  ......
  </code></pre>
  
  <p>Note: i know that im saving to a local variable and that it will be cleared on reload and so on but thats not the problem here...</p>