views:

24

answers:

1

Hello. I've got UpdatePanel with Div

 <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
 <div class="pnlFind" style="display:none;"> 
 </div>
 </telerik:RadAjaxPanel>

wanna use js for showing this div

<script type="text/javascript">
    function pageLoad(sender, args) {
     if (args.get_isPartialLoad()) {
         $('.btAddUser').click(function () {
             $('.pnlFind').show('slow');
             $('.pnlFind').attr('display', 'block');
             return false;
         });
     }
 }
</script>

but after partial postback, I got div invisible again(right! restore DOM) How can I remember that div should be always visible after button click. Thanks

+1  A: 

You have to inject javascript into the page to simulate the click event again. Page.RegisterClientScriptBlock or Page.RegisterStartUpScript should do it.

TheGeekYouNeed
sorry, I don't understad how can I simulate click event again?
Andrew Kalashnikov
then make another function with you .btAddUser code in it and call that. Change your original event (Above) to call it as well so you don't duplicate code.
TheGeekYouNeed