Click here to Skip to main content
15,913,685 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Generalget pc name and ip address of client Pin
Devang Vaja29-Aug-12 3:52
Devang Vaja29-Aug-12 3:52 
GeneralRe: get pc name and ip address of client Pin
Wes Aday29-Aug-12 4:17
professionalWes Aday29-Aug-12 4:17 
QuestionUrgent -----------.RDLC to .Rld Conversion Pin
ashwani Kumar Una29-Aug-12 3:18
ashwani Kumar Una29-Aug-12 3:18 
AnswerRe: Urgent -----------.RDLC to .Rld Conversion Pin
Pete O'Hanlon29-Aug-12 3:40
mvePete O'Hanlon29-Aug-12 3:40 
GeneralRe: Urgent -----------.RDLC to .Rld Conversion Pin
ashwani Kumar Una29-Aug-12 3:58
ashwani Kumar Una29-Aug-12 3:58 
GeneralRe: Urgent -----------.RDLC to .Rld Conversion Pin
Pete O'Hanlon29-Aug-12 4:00
mvePete O'Hanlon29-Aug-12 4:00 
QuestionEntity Framework 1.0 for Insert and Update non primary key tables Pin
indian14328-Aug-12 13:26
indian14328-Aug-12 13:26 
QuestionParsing a Path to the Server Pin
ASPnoob28-Aug-12 0:26
ASPnoob28-Aug-12 0:26 
Hello all I had posted this question in the wrong forum and was asked to move it here.
I'm trying to download a file from a folder on the server but I don't know how to parse the path inside of the HREF attribute of the anchor tage. I'm trying to modify the following code to be used with HTML anchor tag:

C#
protected void Page_PreRender(object sender, EventArgs e)
 {
   DataTable dt = new DataTable("INFO");
   dt.Columns.Add("url", typeof(string));

   string[] fileEntries = Directory.GetFiles(Server.MapPath("~/Documents/"));

   dt.Rows.Add("~/Documents/" + Path.GetFileName(fileName));

   grid.DataSource = dt;
   grid.DataBind();
 }


I wanted to do something like the following on my Page.aspx file:

HTML
<a href="~/Documents/" + Path.GetFileName(fileName)"> DOWNLOAD </a>


However, the above cannot be done. Please help me find and alternative, thanks in advance for your help.
AnswerRe: Parsing a Path to the Server Pin
Hum Dum28-Aug-12 1:41
Hum Dum28-Aug-12 1:41 
GeneralRe: Parsing a Path to the Server Pin
Pete O'Hanlon28-Aug-12 1:52
mvePete O'Hanlon28-Aug-12 1:52 
GeneralRe: Parsing a Path to the Server Pin
s_magus28-Aug-12 2:40
s_magus28-Aug-12 2:40 
GeneralRe: Parsing a Path to the Server Pin
Pete O'Hanlon28-Aug-12 2:41
mvePete O'Hanlon28-Aug-12 2:41 
QuestionCalling Page methods from Javascript Pin
indian14327-Aug-12 7:25
indian14327-Aug-12 7:25 
AnswerRe: Calling Page methods from Javascript Pin
fjdiewornncalwe27-Aug-12 9:34
professionalfjdiewornncalwe27-Aug-12 9:34 
QuestionPrevent Schema Definition in WDSL Pin
Vimalsoft(Pty) Ltd27-Aug-12 4:52
professionalVimalsoft(Pty) Ltd27-Aug-12 4:52 
QuestionExtend WebMethod Pin
Santhosh Natarajan26-Aug-12 22:13
Santhosh Natarajan26-Aug-12 22:13 
SuggestionRe: Extend WebMethod Pin
pramod.hegde27-Aug-12 2:27
professionalpramod.hegde27-Aug-12 2:27 
GeneralRe: Extend WebMethod Pin
Santhosh Natarajan27-Aug-12 3:09
Santhosh Natarajan27-Aug-12 3:09 
QuestionPage_Load(MasterPage) : can't use control-reference here? Pin
StefanUtrecht26-Aug-12 5:42
StefanUtrecht26-Aug-12 5:42 
QuestionRe: Page_Load(MasterPage) : can't use control-reference here? Pin
Eddy Vluggen27-Aug-12 0:29
professionalEddy Vluggen27-Aug-12 0:29 
AnswerRe: Page_Load(MasterPage) : can't use control-reference here? Pin
StefanUtrecht27-Aug-12 21:43
StefanUtrecht27-Aug-12 21:43 
GeneralRe: Page_Load(MasterPage) : can't use control-reference here? Pin
Eddy Vluggen27-Aug-12 22:40
professionalEddy Vluggen27-Aug-12 22:40 
QuestionC# web obtain key value after update table Pin
sc steinhayse24-Aug-12 13:31
sc steinhayse24-Aug-12 13:31 
AnswerRe: C# web obtain key value after update table Pin
Eddy Vluggen27-Aug-12 0:28
professionalEddy Vluggen27-Aug-12 0:28 
Questionnet_io_connectionclosed error in asp.net Pin
ashwani Kumar Una23-Aug-12 21:22
ashwani Kumar Una23-Aug-12 21:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.