Hi ,
I am new to WARP panel. I am migrating one ASP form to .NET. In old ASP page 4 frames were used to handle on click functionality of the WebGrid located in one frame, because on every row click a new page opens in another frame. I don't want to use frames.My simple question is can we acheive this by using WARP Panel ,because i don't want to postback? If yes How ?
Thanks in advance.
Hi,
The best I can do for you, is to explain what WARP does and you should decide if that is good for you.The WARP renders <div> html element and puts all its content (which is defined on server) inside of that element. If any child in that <div> (or any external element defined in TriggerControlIDs) raises postback/submit, then WARP supresses that full postback and raises its own async postback. That async request is processed by WARP on server and server generates special response. That response is processed on client by WARP and the innerHTML of WARP is updated with new data from server. If response contains javascript or other resources, then that is loaded and run as well.The rest of page is not aware about that activity.
Thanks a lot Viktor.
Hi Victor,
I have a grid inside a WARP Panel and a link (<a></a>) outside the WARP panel, on click of the link I have a javascript which has to refresh the grid inside the WARP.
I created a button and the trigger control id of the WARP is button and I also defined the server side click event handler of the button.
I tried doing WARP.refresh() and I also tried __doPostback("buttonid") in the javascript function.
In the code behind if I test for WARP.IsAsyncPostback it says true, but it never goes to the event handler.
The button Id I am passing to the javascript and the trigger control id is Button.ClientId which I am setting on prerender.
Am I missing anything?
Hi Anni,
I suggest to use button.click(), but not __doPostBack or similar.
I wrote a sample for you, which will raise server event of Button located outside or inside WARP.
<igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" TriggerControlIDs="Button1"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="Button" /></igmisc:WebAsyncRefreshPanel><asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
<script type="text/javascript">function doClick(){ var but1 = document.getElementById('<%=Button1.ClientID%>');// var but2 = document.getElementById('<%=Button2.ClientID%>'); if(but1) but1.click();// if(but2)// but2.click();}</script><a onclick="doClick()">DoButtonClick</a>
Thank you victor.