Protected Sub BtnInsert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnInsert.Click
following is my code and the radwindow is not closing while website hosted in IIS
by directly running from visual studio its working
''''''' client side
function CloseAndRebind(args) {
GetRadWindow().Close();
GetRadWindow().BrowserWindow.refreshGrid(args);
}
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
return oWindow;
}
''''''server side
Try
If Not ViewState("FileName") Is Nothing Then
sSql = " insert into Images(Name, Description, ImageName) values('" & DoInsertable(txbName.Text.Trim) & "','" & DoInsertable(txbDescription.Text.Trim) & "','" & DoInsertable(ViewState("FileName")) & "')"
ExecuteQuery(sSql)
ViewState("FileName") = Nothing
ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind('navigateToInserted');", True) ''check here
Else
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "newkey", "<script>alert('No File Exists');</script>", False)
End If
Catch ex As Exception
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "mykey", "<script>alert('" & Err.Description & "');</script>", False)
End Try
End Sub