I've got this Javascript HREF:
<a
href="javascript:void(window.open('print_Mileage.aspx?id=<%#sID%>&emp=<%#sEmp%>'))">Printer
Friendly Page</a>
The variables sID and sEmp are populated when the page loads. However when I
hover over the link for this, the variables are not populated in the
querystring.
I tried doing a Page.Databind at page_load, but I had an erroneous error
that only disappeared once I removed the line.
I know I've done this before, but I can't remember how - - - - What am I
missing here?
Mark Rae [MVP] - 18 Dec 2007 16:48 GMT
> I know I've done this before, but I can't remember how - - - - What am I
> missing here?
# is Databinding shorthand... If you don't want to use that, you need to
use:
<a
href="javascript:void(window.open('print_Mileage.aspx?id=<%=sID%>&emp=<%=sEmp%>'))">Printer
Friendly Page</a>

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Cowboy (Gregory A. Beamer) - 18 Dec 2007 17:06 GMT
One option, that gives you full control, is to bind in code behind. To do
this, use a hyperlink control instead of an anchor <a href>. It will create
the ifno for you.
If this is part of a grid, you can set up the hyperlink control in the grid
and use the designer to add the information to the URL string.

Signature
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************************************************
| Think outside the box!
*************************************************
> I've got this Javascript HREF:
>
[quoted text clipped - 10 lines]
> I know I've done this before, but I can't remember how - - - - What am I
> missing here?