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
Style="z-index: 101; left: 896px; position: absolute; top: 80px" Text="Print" Width="80px" /> 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(); } } }
|
Replies
Know the answer? Post it — somebody with the same question will find it here.