Export button inside Update Panel

Posted by Anu_dgr8 under ASP.NET AJAX on 11/20/2011 | Points: 10 | Views : 1901 | Status : [Member] | Replies : 3
Hi Guys!

I have a Gridview and a asp Button inside an UpdatePanel.And on the click of the button i have written an EVent handler to EXPORT THE RECORDS of the Gridview to Excel sheet.But Jscript Runtime error is throwing on the click of the button.
And if i put the button outside the UpdatePanel,then everything works fine.

Why is this happening?And why cant we put the button inside the Update panel in this case?

Thanks in Advance!

Thanks and Regards,
Hoosha Boosha



Responses

Posted by: Blessyjees on: 11/21/2011 [Member] Bronze | Points: 25

Up
0
Down
hi,

Can you specify the error. There is a chance to conflict between you javascript and ajax script.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Anu_dgr8, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Anu_dgr8 on: 11/28/2011 [Member] Starter | Points: 25

Up
0
Down
code is attached here.
Thanks and Regards
 Download source file

Thanks and Regards,
Hoosha Boosha

Anu_dgr8, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: RohiK on: 11/29/2011 [Member] Starter | Points: 25

Up
0
Down
Hi

just put your button id in the trigger of update panel.

<Triggers>

<asp:AsyncPostBackTrigger ControlID="Button1"/>
</Triggers>


Happy Programming!!
Rohi

Anu_dgr8, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response