hi ,
iam using asp.net2.0 with c#
the print out paper size is like shops printer small size
i want to print current date,transfer no and two colums from gridview
 ItemKey and quantity
can you correct my code which helps me

C#
 

  
    
    function doPrint()
        {
            var prtContent = document.getElementById('');
            prtContent.border = 0; //set no border here
            
            var WinPrint = window.open('','','left=0,top=100,width=80,height=100,toolbar=0,scrollbars=1,status=0,resizable=1');
            WinPrint.document.write(prtContent.outerHTML);
            WinPrint.document.close();
            WinPrint.focus();
            WinPrint.print();
            WinPrint.close();
        }
   
    
    
    

        
             
    
protected void Page_Load(object sender, EventArgs e)
   {
       if (Page.IsPostBack == false)
       {
           filldata();
       }
protected void filldata()
    {
                 SqlConnection con = new SqlConnection("Data Source=VER;Initial Catalog=Company;Min Pool Size=5;Max Pool Size=100000;Connect Timeout=100000;User ID=sa;Password=103");
        SqlDataAdapter da = new SqlDataAdapter("select Itemkey,Item,Quantity  from temp where TransferNo=" + Convert.ToInt32(Session["TransferNo"].ToString()) + "", con);
        DataSet ds = new DataSet();
        da.Fill(ds, "temp");
        if (ds != null && ds.Tables != null && ds.Tables[0].Rows.Count > 0)
        {
            
            GridView1.DataSource = ds.Tables["temp"];
            GridView1.DataBind();
        }
    }
   }