Checked
But from master page my Menu item get collapsed
I did not use any HTMl tag
Eg
Home Manu Admin ( before pront button )
After print button
my Menu item collapsed
Home
Menu
Admin
My print function is
my code is
Gridview1.UseAccessibleHeader = True
Gridview1.HeaderRow.TableSection = TableRowSection.TableHeader
Gridview1.Attributes("style") = "border-collapse:separate"
Dim isFirst As Boolean = False
For Each row As GridViewRow In Gridview1.Rows
If row.RowIndex Mod 18 = 0 AndAlso row.RowIndex <> 0 AndAlso isFirst = False Then
row.Attributes.Add("style", "page-break-after:always;")
isFirst = True
End If
If row.RowIndex Mod 23 = 0 AndAlso row.RowIndex <> 0 AndAlso isFirst = True Then
row.Attributes.Add("style", "page-break-after:always;")
isFirst = True
End If
Next
Gridview1.AllowPaging = False
Gridview1.DataBind()
' Gridview1.Width = "800"
Dim sw As New StringWriter()
Dim hw As New HtmlTextWriter(sw)
grdpanel.RenderControl(hw)
Dim gridHTML As String = sw.ToString().Replace("""", "'") _
.Replace(System.Environment.NewLine, "")
Dim sb As New StringBuilder()
sb.Append("<script type = 'text/javascript'>")
sb.Append("window.onload = new function(){")
sb.Append("var printWin = window.open('', '', 'left=0")
sb.Append(",top=0,width=960,height=600,status=0');")
sb.Append("printWin.document.write(""")
Dim style As String = "<style type = 'text/css'>thead {display:table-header-group;} tfoot{display:table-footer-group;}</style>"
sb.Append(style & gridHTML)
sb.Append(""");")
sb.Append("printWin.document.close();")
sb.Append("printWin.focus();")
sb.Append("printWin.print();")
sb.Append("printWin.close();};")
sb.Append("</script>")
ClientScript.RegisterStartupScript(Me.[GetType](), "Gridview1List", sb.ToString())
Gridview1.AllowPaging = True
Gridview1.DataBind()
Can you please tell me why this is happening ?