I am opening an javascript ShowModalDialog from ASP.Net Code behind and the code is as mentioned below:-
string _timeSpentinMin="123";
Page page = HttpContext.Current.CurrentHandler as Page;
ScriptManager.RegisterStartupScript(page, page.GetType(), "OpenModalDialog", "<script type=text/javascript>window.showModalDialog('ClockPopUP.aspx', null, 'dialogWidth:290px;dialogHeight:270px;status:no'); </script>", false);
I also want to pass a query string to Clock.aspx and from javascript i m doing it like this:-
function openmodalWinLunch() {
var variable1 = "Lunch";
window.showModalDialog("ClockPopUP.aspx?code=" + variable1, "dialogWidth:290px;dialogHeight:270px,");
}
My question is that how we will do the same from asp code behind.Please update my ASp.Net code behind as mentioned above to fulfill my needs. I want to pass a string variable _timespentinMin from querystring to Clock.aspx page using showmodalDialog.
1 Answer