Download files from gridview with linkbutton click in asp net
Sign in to vote. User posted i have uploaded file to one folder now in gridview i have linkbutton ,when i click on linkbutton file is not getting download plz tell me what is wrong with code? CommandArgument; Response. Write filenm ; Response. Saturday, February 15, AM. User posted Try this way..
Clear ; Response. Write filename ; Response. End ; -Rajesh. You're looking for Response. TransmitFile filePath ; Response. Bozhidar Stoyneff Bozhidar Stoyneff 3, 1 1 gold badge 13 13 silver badges 24 24 bronze badges. Hi Bozhidar, Thanks for the code. But I the problem is related to the JS window. Add a comment. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog.
Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled.
Protected Sub BindGrid. Add New ListItem Path. GetFileName filePath , filePath. EventArgs Handles btnUpload. If FileUpload1. HasFile Then. Write "Please select file to upload".
GetFileName filePath. WriteFile filePath. Delete filePath. End Sub Now over to you:. Tweet Share Share Share. Lalit Raghuvanshi Read More. Next « Prev Post. Previous Next Post ». Lalit Raghuvanshi admin.
0コメント