I want to add a portlet which forms like igoogle widget. So i want to add widget dynamically by calling a javascript function. SO i tried to acomplish it in this way.

Javascript function

<script type="text/javascript" language="javascript">

function AddWidget()




ASP.Net Controls Code Page

<ext:LayoutColumn ColumnWidth=".33">




StyleSpec="padding:10px 0 10px 10px">


<ext:AnchorLayout ID="AnchorLayout2" runat="server">


<ext:Portlet Title="Panel 2" Height = "300" runat="server" > 

<AutoLoad Url="http://www.wikipedia.org/" Mode="IFrame"/>




<ext:Portlet ID="Portlet3" Title="Another Panel 2" runat="server" >






The thing is i could not achieve to add portlet this way. The look is crippled and as i refreshed the page the widgets go away. So please provide the solution if any body found the way out.