Torna al Thread

Protected Sub GridView1_RowCommand(sender As Object, e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand If (e.CommandName = "print") Then Dim index = Convert.ToInt32(e.CommandArgument) Dim row = GridView1.Rows(index) Dim Lbidpagamento As Label = CType(row.FindControl("Lbidpagamento"), Label) Dim url As String = "stampe.aspx?tiporeport=" + "3" + "&codcomune=" + Hfcodcomune.Value + "&idpagamento=" + Lbidpagamento.Text + "&idstruttura=" + Hfidstruttura.Value ScriptManager.RegisterStartupScript(Page, Page.GetType(), "OpenWin", "apristampa('" & url & "');", True) End If End Sub Protected Sub GridView1_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then Dim Lbpagconfermato As Label = CType(e.Row.FindControl("Lbpagconfermato"), Label) Dim btnprint As Button = DirectCast(e.Row.FindControl("Btnprint"), Button) If CBool(Lbpagconfermato.Text) = True Then btnprint.Enabled = True Else btnprint.Enabled = False End If End If End Sub
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5