English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hello All,
I want to develop a datagrid page in ASP.Net 2 in VS.2005 editor. I want the following result.

========================
File ********* Date
========================
ABCFile.txt **** 1/1/111111
XYZFile.zip **** 1/1/2007



When user click on the selected it will start donwload by opening new page or direct donwload... I am trying to do it from 1 week but not getting my result according to me,

NOTE:: File information is saved in database with a fixed Folder. All files will upload in a same folder but its name inluding path will store in database table.


If you will help me it will be your pleasure.

Thanks in advance

2007-03-16 08:46:50 · 1 answers · asked by Jack J 1 in Computers & Internet Programming & Design

1 answers

Well, I'm not sure how much pleasure I'm going to get from answering this question, but here goes.

All you need to do is use a HyperLink control to link to the file you want.

Let's assume that you have all the files you want to reference located in a directory named Downloads.

Let's assume that the column names for your fields are FileName, FileData and FileDate.

Rather than using a DataGrid, which is depricated, we'll use a GridView, which we'll bind to a SqlDataSource.

View the code here:

http://geocities.com/dhvrm/aspnet_gridview_hyperlinkfield.html

2007-03-16 10:16:31 · answer #1 · answered by Anonymous · 0 0

fedest.com, questions and answers