ramesh s

ramesh s

  • NA
  • 116
  • 8.8k

Open uploaded file without using Javascript

Aug 4 2017 4:09 AM
Hi,
 
we have an asp.net application, initially user filled the form with uploaded file once submitted the page then shows last 10 transactions in the dynamically created html table. The uploaded file is anchor tag when click on link (html anchor tag) the file displays in the new browser. To view page in codebehind dynamically created anchor tag as shown below
 
for (int x-0; x <rowscount; x++)
string strpath = strLocation;
link = @"<a href=""javascript:goLink(' " + strPath + @" ' ) "">" + row["filename"].ToString() + "</a>"
 }
 
javascript funciton
---------------------- 
function goLink(file)
{
strUrl = 'file:' + file;
linkNewWin = window.opne(strUrl, linkNewWin);
linkNewWin.focus();
 } 
 
my requirement is without using javascript function need to same achieve. 
 
Please suggest. 
 
Thanks,
Ramesh 

Answers (3)