Scenario:
I have a CaseEdit.aspx page in which on have 3 buttons:
- AddImage
- FinalPage
- QuestionAns
and one web user controls that CaseContentList.ascx.
In casecontentlist I have datalist in that I am lbtnDisplay.
When we are clicking on caseEdit.aspx btn we are adding the name to the lbtnDisplay (suppose I clicked on btn addimage then addimage will add to dataliast, if btnqusans clicked then qusans will add in that datalist lbtn).
Now, on every btn click I am opening the following web user controls:
-
on AddImage click i am opening AddImage.ascx (using tinymce editor)
-
on FinalPage click i am opening FinalPage.ascx (using tinymce editor)
-
on QuestionAns click i am opening QuestionAns.ascx (using tinymce editor)
-
and when i am clicking on datalist link btn (lbtnDisplay) on any item then, PageContent.ascx is opening.
All these things are happening on caseEdit.aspx page.
Requirement:
-
when we are in edit mode of any page and moving to some other page it must show the confirmation alert box.
-
when page content is opened on lbtnDisplay click and then we are going to some other page it should not show the confirmation alert box.
I have taken a hidden field and keeping the value=0, when i am clicking on edit button changing the value to 1 and after that i am comparing the value of text box and hidden filed when user click on some other link its working fine..