title: How to use ClientScript.getpostbackclienthyperlink inside INamingContainer
body: <p>I have a custom WebControl class which inherits from WebControl and INamingContainer. Inside this class is a gridview which I want to have clickable rows. </p>
  
  <p>I have the gridviews <code>AutoGenerateSelectButton</code> set to <code>True</code> for the time being, but eventually I want to replace this with a row onclick event which posts back to the server.</p>
  
  <p>In the gridviews <code>RowCreated</code> event I have the following code to add my desired onclick event to each row:</p>
  
  <pre><code>e.Row.Attributes["onclick"] = Page.ClientScript.GetPostBackClientHyperlink(this.gvUserList, "Select$" + e.Row.RowIndex);
  </code></pre>
  
  <p>Unfortunately, this doesnt work and generates a slightly different output to the select button due to my class inheriting from INamingContainer.</p>
  
  <p>The generated output from the select button (which works) is:</p>
  
  <pre><code>onclick="__doPostBack('UserData$gvUserList','Select$2');"
  </code></pre>
  
  <p>Whereas the code generated from the ClientScript.GetPostBackClientHyperlink method is this:</p>
  
  <pre><code>onclick="__doPostBack('gvUserList','Select$2');"
  </code></pre>
  
  <p>Notice that the javascript for the select button prefixes the gridviews name with 'UserData$' (The ID given to my control from the page itself) because of the <code>INamingContainer</code> interface, while the postback client hyperlink does not.</p>
  
  <p>How can I achieve the same generated output as the select button does with the GetPostBackClientHyperlink method?</p>