Click here to Skip to main content
15,902,635 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am writing a javascript method in code behind which will take the dynamic url and open the popup.

C#
string scriptpopup1 = @"function Test(dialogUrl) {
                                   SP.UI.ModalDialog.showModalDialog({
                                   url: dialogUrl,
                              dialogReturnValueCallback: RefreshOnDialogClose
                                });

                                }";


Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "CssScript",scriptpopup1,true );

Url = mySite.Url + "/_layouts/WrkTaskIP.aspx?List=" + lst.ID + "&ID=" + arlTreeObj[k].ToString() + "&IsDlg=" + 1;

but i am not able to open the popup if i assign it to DataNavigateUrlFormatString

property.

pendingGridColumn.DataNavigateUrlFormatString = "javascript:Test('" + Url + "')";//This statement is not working :-(

any idea on this is greatly appreciated.

Thanks in advance.
Posted

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