If ddlView.SelectedValue = "Default View" Then gvFiles.DataSource = cmd.ExecuteReader() gvFiles.DataBind() If gvFiles.Rows.Count > 0 Then butDownload.Visible = True butReset.Visible = True butZip.Visible = True pnlLinks.Visible = True butDownload1.Visible = True butZip1.Visible = True butReset1.Visible = True Else Dim sb As New System.Text.StringBuilder() Dim message As String = "No Record Found" sb.Append("<script type = 'text/javascript'>") sb.Append("window.onload=function(){") sb.Append("alert('") sb.Append(message) sb.Append("')};") sb.Append("</script>") ClientScript.RegisterClientScriptBlock(Me.GetType(), "alert", sb.ToString()) End If End If If ddlView.SelectedValue = "Classification View" Then gvFiles.Dispose() gvFiles.DataSource = Nothing gvFiles.DataBind() gvFiles.Visible = False gvClassification.DataSource = cmd.ExecuteReader() gvClassification.DataBind() If gvClassification.Rows.Count > 0 Then butDownload.Visible = True butReset.Visible = True butZip.Visible = True pnlLinks.Visible = True butDownload1.Visible = True butZip1.Visible = True butReset1.Visible = True Else Dim sb As New System.Text.StringBuilder() Dim message As String = "No Record Found" sb.Append("<script type = 'text/javascript'>") sb.Append("window.onload=function(){") sb.Append("alert('") sb.Append(message) sb.Append("')};") sb.Append("</script>") ClientScript.RegisterClientScriptBlock(Me.GetType(), "alert", sb.ToString()) End If End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)