How to open ShowModalDialog of Javascript from asp.net code behind (C#). Please provide me the code if possible and one more thing which i want to mention that , i m using Script manager on my page from where i want to open the pop up.
Asked
Active
Viewed 4,111 times
1 Answers
0
call javascript function from code behind ....
ClientScript.RegisterStartupScript(GetType(),"hwa","Samplefn();",true);
write the following code ...in javascript:
function samplefn()
{
$("#dialog-form").dialog("open");
}
the above code used to open model dialog
$(function() {
$("#dialog-form").dialog({
autoOpen: false,
minHeight: 50,
position: [300, 50],
height: 'auto',
width: 400,
modal: true
});
});
otherwise you can directly open model dialog from code behind..
ClientScript.RegisterStartupScript(GetType(),"hwa"," $('#dialog-form').dialog('open');",true);
Prabhakaran Parthipan
- 4,193
- 2
- 18
- 27