views:

13

answers:

1

Let say I have:

 <asp:ImageButton ID="btnNoticeClose" runat="server" 
 ImageUrl="~/img/btn_spara_green.gif" ToolTip="Stäng" 
 OnClientClick="jQuery('#Notice').hide();" 
 Click="btnNoticeClose_Click"/>

How do I call a btnNoticeClose_Click without rerendering anything? As I don't need to rerender anything I don't want to use an UpdatePanel? or do I?

A: 

try:

 OnClientClick="jQuery('#Notice').hide();return null;"

or write full function in js:

function CloseThis()
{
    $("#Notice").hide();
    return true;
}

 OnClientClick="javascript:CloseThis();"

EDIT:- Well you want to call server side method as well and don't want to render anything. Then only option left is using page method and using jQuery AJAX. Please head here to Dave's blog for more information on this.

TheVillageIdiot
Well, ok. but I aktually want to call btnNoticeClose_Click as well?
Niels Bosma