1

In my asp.net based application, I am reading a WebResponse by invoking a Http WebRequest to another aspx page. The response contains a table (Gridview used in actual page) with a td column(among other td columns) containing an anchor element. On click of the anchor call to download the relevant file is made.

One sample:

<td><a href="javascript:__doPostBack('ctl00$PlaceHolderMain$TOC$ctl00','DownloadFile$0')">File 1</a></td>

My goal is to create a table in my aspx page which mimicks the actual table with lesser columns. It will still need the column with link. My challenge is with this link and how to make it functional. I am planning to have the complete Web Response stored in a hidden div or iframe. And when the user clicks the link in my table I am planning to mimick the link / anchor click by somehow calling the __doPostBack function within the response.

Firstly I wanted to check if this is an achievable solution. Are there any better approach to achieve this functionality? Any guidance in this regards will be helpful.

Thanks in advance!

Justin Samuel
  • 1,063
  • 4
  • 16
  • 30
  • 1
    Why not just retrieve whatever data you need via AJAX? Why are you trying to hack around the Web Forms framework? – mason Mar 15 '18 at 17:56

0 Answers0