tag:blogger.com,1999:blog-876410882844342249.post2857184014884387896..comments2024-03-28T20:16:25.531-07:00Comments on Step towards Dot Net: Downloading file using GridView in Asp.Net.Jitendra Fayehttp://www.blogger.com/profile/02024440473510402864noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-876410882844342249.post-47994787727340122272018-07-08T14:52:04.177-07:002018-07-08T14:52:04.177-07:00The calculation of net assets gives us a snapshot ...The calculation of net assets gives us a snapshot at a particular time of our wealth and while a simple tool it is important that we all know where we are financially. For example this <a href="https://thecelebnetworth.com/tiny-net-worth-song-writersinger/" rel="nofollow">Tiny Net Worth</a> can help you to get a loan by showing that there is value and your money has been managed adequately to build wealth. It pays to learn the lessons of how to calculate net assets.<br />Work Mailhttps://www.blogger.com/profile/03584557372432548736noreply@blogger.comtag:blogger.com,1999:blog-876410882844342249.post-12633841714599875802015-09-16T01:09:26.533-07:002015-09-16T01:09:26.533-07:00gridview_rowcommand is not working in my code but ...gridview_rowcommand is not working in my code but iam not getting any errorsAnonymoushttps://www.blogger.com/profile/03012659204351559327noreply@blogger.comtag:blogger.com,1999:blog-876410882844342249.post-54875380492523705182015-09-16T01:06:24.244-07:002015-09-16T01:06:24.244-07:00hi ,
iam not getting errors but iam unable to down...hi ,<br />iam not getting errors but iam unable to download a file here over my code<br /><br /> <br />cs.code<br /> private void bindgrid()<br /> {<br /><br /><br /> con = new SqlConnection(str);<br /> con.Open();<br /> SqlDataAdapter da = new SqlDataAdapter("select Code,Tiltle,Abstract from btechcivilmajorswprjcts ", con);<br /> DataSet ds = new DataSet();<br /> da.Fill(ds);<br /> GridView1.DataSource = ds;<br /> GridView1.DataBind();<br /><br /> con.Close();<br /> }<br />protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)<br /> {<br /> try<br /> {<br /> //Code to download file<br /><br /> if (e.CommandName == "download")<br /> {<br /> string filepath = Convert.ToString(e.CommandArgument);<br /><br /> byte[] data = System.IO.File.ReadAllBytes(filepath);<br /> Response.Clear();<br /> Response.ClearHeaders();<br /> Response.AddHeader("Content-Type", "Application/octet-stream");<br /> Response.AddHeader("Content-Length", data.Length.ToString());<br /> Response.AddHeader("Content-Disposition", "attachment; filename=" + filepath);<br /> Response.BinaryWrite(data);<br /> Response.End();<br /> }<br /><br /> }<br /> <br /><br /> catch (Exception)<br /> {<br /> throw;<br /> }Anonymoushttps://www.blogger.com/profile/03012659204351559327noreply@blogger.comtag:blogger.com,1999:blog-876410882844342249.post-35918655648774896752013-12-27T18:36:24.870-08:002013-12-27T18:36:24.870-08:00HI Sayantan,
The error itself show that file is n...HI Sayantan,<br />The error itself show that file is not present in given path.<br />You should give correct path for each file in filepath field in table.<br /><br />Try and let me know.Anonymoushttps://www.blogger.com/profile/04477774446792813144noreply@blogger.comtag:blogger.com,1999:blog-876410882844342249.post-67241432225583177662013-12-27T13:35:42.173-08:002013-12-27T13:35:42.173-08:00Could not find a part of the path 'C:\Program ...Could not find a part of the path 'C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0\emp_resume\Case_studies.pdf'.Sayantanhttps://www.blogger.com/profile/05105176778427401726noreply@blogger.comtag:blogger.com,1999:blog-876410882844342249.post-72726214413219058642013-12-27T13:35:03.065-08:002013-12-27T13:35:03.065-08:00getting this errorgetting this errorSayantanhttps://www.blogger.com/profile/05105176778427401726noreply@blogger.com