Torna al Thread

javascript: function GetRadWindow() { var oWindow = null; if (window.radWindow) oWindow = window.radWindow; else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; return oWindow; } function Close(argument) { GetRadWindow().close(argument); } codice code behind: Private Sub update_image(ByVal idutente As Int32, ByVal image As String) Try Dim conString = ConfigurationManager.ConnectionStrings("TrycontactString") Dim strConnString As String = conString.ConnectionString Using db As New SqlConnection(strConnString) db.Open() Using sqlcmd As New SqlCommand("Sp_update_imageprofile", db) sqlcmd.CommandType = CommandType.StoredProcedure sqlcmd.Parameters.AddWithValue("@id", SqlDbType.Int).Value = idutente sqlcmd.Parameters.AddWithValue("@imageprofile", SqlDbType.VarChar).Value = image sqlcmd.ExecuteNonQuery() Dim _img As String = Replace(image, "~", "") ViewState("VarImage") = _img ScriptManager.RegisterStartupScript(Page, Me.GetType, "openconferma", "openconferma();", True) End Using End Using Catch ex As SqlException Exit Sub Catch ex As Exception Exit Sub End Try End Sub Protected Sub ImageButton2_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImageButton2.Click ScriptManager.RegisterStartupScript(Page, Me.Page.GetType(), "closeWindow", "Close('" & ViewState("VarImage") & "');", True) End Sub
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5