Posts

Showing posts from October, 2014

ShowModalDialog of javascript is not closing from ASP Code behind and opens a new pop up of same page

Introduction: What is and why to use SHowModalDialog :  In Many application, many of popups are implemented using window.showmodaldialog which restricts user to finish work on popup before changing focus to any other part of application.  For exaple just try to shut down your Smartphone and you will be prompt with a message that will force you to confirm your decision which probably uses ModalPopUp. It freezes everything in backgrund and without getting any input from your side it doesn't allow you to change something in background page. Issue : Generally an issue comes that while using ShowModalDialog of javascript doesn't closes from ASP Code behind and opens a new pop up of same page. To solve this issue just add <base target="_self"/> in <head> tag. Below I have shown an example how to use a ShowModalDialog and close it. < head runat ="server"> < base target ="_self" /> < title >&l
go to top image