Hi Experts
Need Suggestion
I have a column in my grid which is supposedly a hyperlink that would open in a new page when clicked .I have the pdf document that would open up when i click on the hyperlink .But in chrome it doesnot do anything and in firefox it says the bad request followed by the pdf document hyperlink.
Can anyone help me to solve this problem....
Loading
Jignesh TrivediPosted May 16, 2012, 11:39 PM
you have grid view, write RowCommand Event and in Row command event,content write to page.
for Row command event please refer..
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowcommand
try following code..
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=mydata.pdf");
Response.TransmitFile(@"c:\jigneshtest\mydata.pdf");
Response.End();
hope this will help.