Click here to Skip to main content
15,924,317 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to retain the value after getting redirected to a page?
I am checking for an alert message for a duplicate combination server side. If such a value exists I need to show the same in a pop up window. If the checkbox is checked in the pop up window user must be able to save the data. Else the pop up must remain there.
I can't use client side option as there are other validations done in the server side on button click and duplicate checking also done there.

What I have tried:

I am passing the message as below to another page with checkbox to override the validation. If checked then data needs to be saved else pop up should remain there.
C#
strDuplicateDDAValidationError = "test";
                string qryString = "?DuplicateDDACombinationMessage=" + strDuplicateDDAValidationError;
                if (qryString != "")
                {
                    Page.RegisterStartupScript("View_OUT_300_DDA_Duplicate_Validation.aspx", "<script language=\"javascript\">var answer = window.showModalDialog(\"View_OUT_300_DDA_Duplicate_Validation.aspx" + qryString + "\",'',\"dialogWidth:1000px; dialogHeight:800px; center:yes\");</script>");
                    return;
                }
Posted
Updated 18-Feb-16 4:20am
v2

1 solution

showModalDialog[^] is in the process of being dropped, and should not be used. It was removed from Chrome in v37 back in 2014, and Firefox will drop support in June this year.

You will need to change your code to use an alternative - for example:

The modal dialog content will then be part of your main page. You should be able to add a <asp:CheckBox AutoPostBack="True"> to the content, which will trigger a post-back when the user checks the box.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900