My aspx design is -
BackgroundCssClass="modalBackground" CancelControlID="btnCancel"/>
----------
Issue -
btnCancel_Click event is not firing.
When I run the portal... and click on "Cancel" button, the event is not getting fired...
Please help me out.. .I am not able to debug the issue...
Riddhi ValechaPosted Apr 12, 2015, 6:38 AM
Yes... There is an Insert Query written on the code-behind....
I removed the CancelTargetControlID Property... and then I debug the application..
This time, the event fired...
So..If I close the popup on this button (modalpopup1.Hide()), is this correct way of doing the code ??
Or am I going wrong somewhere ?
Khargesh RajputPosted Apr 9, 2015, 7:00 AM
on btncacel
write code for delete data
after delete
modalpopupID.hide();// to close popup but it will postback your page
saravanagopi sPosted Apr 9, 2015, 6:57 AM
is there any code to delete the record from table there in btncancel click event?
Riddhi ValechaPosted Apr 9, 2015, 2:11 AM
This means...
I have to take one more button control, make it visible = false and then fire that button_click event ??
Please explain step-wise.
Is it that I have to take asp:Button and do this ??
Kindly let me know where I am going wrong ?
The CancelControlID - directly closes the popup...
Prafulla ChoudharyPosted Apr 9, 2015, 2:02 AM
Khargesh RajputPosted Apr 9, 2015, 1:07 AM
then you have to write code on cancel button click to first delete data after that
modalpopup.hide();
Riddhi ValechaPosted Apr 9, 2015, 12:53 AM
I just have to do 2 small things in this modal popup...
When a file is uploaded , I have to fire an insert query (insert into table (task) value('File Uploaded')
When Cancel button is clicked, then insert "File uploading cancelled" in the database....
How to do this ?? I am able to insert - "File uploaded" in database... But... on cancel button, the event is not getting fired...
How to achieve this ??
Please guide...
If I have to use javascriot.. then how to call a method in java script ??
Please help !
Khargesh RajputPosted Apr 8, 2015, 1:42 PM
If you want to do something on btncancel then use.javascript
Keertti Raj Thangavelu BabuPosted Apr 8, 2015, 8:29 AM
use this code, if you pass cancel button id to cancelcontrolId you should not use onclick function that only for close the panel.
Add Document
BackgroundCssClass="modalBackground" CancelControlID="btnCancel"/>
---------------------------------------------------------------------------
Please accept and up vote if helped you