hello,
I am using same this data and GridView Filter GridView based on ASP.Net DropDownList selected value using C#.
I want print each page for 1 user
So when i select 5 users and press print
I need print 5 pages each user with full details
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
<asp:TextBox ID="txtdate" runat="server"></asp:TextBox>
protected void Button1_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[4] {
new DataColumn("Id"),new DataColumn("name"),new DataColumn("civilid"),new DataColumn("blockrasme")});
foreach (GridViewRow row in GridView1.Rows)
{
if ((row.FindControl("CheckBox1") as CheckBox).Checked)
{
string id = (row.FindControl("lblRowNumber0") as Label).Text.Trim();
string name = (row.FindControl("Labname") as Label).Text.Trim();
string civilid = (row.FindControl("lLabcivilid") as Label).Text.Trim();
string blockrasme = (row.FindControl("Labelblockrasme") as Label).Text.Trim();
dt.Rows.Add(id, name, civilid, blockrasme);
}
}
string url = "/Admin/reportprint.aspx";
string s = "window.open('" + url +
"', 'popup_window', 'width=850,height=850,left=100,top=100,resizable=yes');";
ClientScript.RegisterStartupScript(this.GetType(), "script", s, true);
}