mbart
asked on
how can I popup a pdf file?
I am at my wits end on what should be a simple solution. I have a datagrid which has bound hyperlink column which is a pdf file name. When the user clicks on it, I want to open a new window and show the pdf file. Have searched every where and asked several different ways with no luck I am using VB and need an example. Lots of points available, just need some help.
Hi,
I use javascript - try the code in the handler for the link command in the datagrid
c#:
string js = "<script> window.open(\"numerical.pd f\")</scri pt>";
Response.Write(js);
or you can get the value of the field and put it where I have "numerical.pdf"
hope this helps
cheers
I use javascript - try the code in the handler for the link command in the datagrid
c#:
string js = "<script> window.open(\"numerical.pd
Response.Write(js);
or you can get the value of the field and put it where I have "numerical.pdf"
hope this helps
cheers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks so much Henry that answers my questions on how to set it up.
dim url as string
in the itemdatabound event
dim hlnk as hyperlink = (hyperlink) e.item.FindControl("hyperl
hlnk.attributes.add("Oncli
in the aspx file..
write a javascript
function fnopenwindow()
{
var args = fnopenwindow.arguments
window.open(args[0])
}