Hi, I have an ASP.Net page which utilises code behind to check for a certain browser.

If the browser is IE I want to add in a usercontrol called IEcontrol otherwise I will not add in anything. I also want to add the control in a certain place in the website (Without using positioning via DHTML).

I have a routine called AddUserControl in the codebehind page which just adds in the control via code. The routine works fine.

What I want to know is how can I call this routine form a certain point in the ASPX page so the control appears in a TD cell for example? I though this might work..

Code:
<table>
 <tr>
  <td>
   <script language=VB runat=server>
     AddUserControl
   </script>
  </td>
 </tr>
</table>
This does not work and give me an error

BC30188: Declaration expected.

The aspx does inherit the aspx.vb page so that does not seem to be the problem

Thanks in advance
Mark