Change hyperlink to linkbutton to pass parameter

I need help writing a LinkButton from a DetailsView to render another page in a popup window.  The following ASP.NET 2.0 shows the query string I'm trying to pass.  It works just fine, but Ionly with a literal (...FacilityID=240).  

<a href="javascript:;" onclick="javascript:window.open('FacilityImages.aspx?Table=CertificationCriteria2_FacilityImages&FacilityImages_FacilityID=240','','left=600px, top=100px, width=540px, height=600px, scrollbars=yes, status=no, resizable=yes');return false;">Test</a>

I tried using {0}:

<a href="javascript:;" onclick="javascript:window.open('FacilityImages.aspx?Table=CertificationCriteria2_FacilityImages&FacilityImages_FacilityID={0}','','left=600px, top=100px, width=540px, height=600px, scrollbars=yes, status=no, resizable=yes');return false;">Test</a>

And <%# Eval(“FacilityID”)%>

<a href="javascript:;" onclick="javascript:window.open('FacilityImages.aspx?Table=CertificationCriteria2_FacilityImages&FacilityImages_FacilityID=<%# Eval(“FacilityID”)%>,'','left=600px, top=100px, width=540px, height=600px, scrollbars=yes, status=no, resizable=yes');return false;">Test</a>

To no avail.  Please help.
mikrojonesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mikrojonesAuthor Commented:
I need to do the same thing for a HyperLink control, i.e., create a LinkButton control that passes two parameters to another Web page in a popup.  The following works but the user may lose context:

<asp:HyperLinkField DataNavigateUrlFields="FacilityID,MeterID," DataNavigateUrlFormatString="~/MeterImages.aspx?Table=MeterSpecification_MeterImages&amp;MeterImages_FacilityID={0}&amp;MeterImages_MeterID={1}" Text="Submit photograph(s)"></asp:HyperLinkField>
0
guru_samiCommented:
--?The following works but the user may lose context:
You mean popup?
Did you try setting the property Target="_blank" ?
0
mikrojonesAuthor Commented:
I think my question was a little confusing.  I need a popup so the user will be aware s/he has two windows open.  Previously, I used a hyperlink to open another page in the same window, and the user may forget s/he needs to go back to the previous page.  Thanks.
0
guru_samiCommented:
--->I need a popup so the user will be aware s/he has two windows open.
HyperLink and HyperLinkField both has a property named - "Target".
Set it to "_blank" and when user click on hyperlink ...it will open in different window i.e. popup...

another way if you want to use LinkButton will be injecting javascript from code-behind upon button click like shown here:
http://dotnetslackers.com/articles/aspnet/JavaScript_with_ASP_NET_2_0_Pages_Part1.aspx#s6
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mikrojonesAuthor Commented:
Link to article on injecting javascript into ASP .NET 2.0 Web pages was instructive.  It helped me solve the question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.