?
Solved

Adding EVAL to asp:HyperLink NavigateUrl Tag

Posted on 2009-12-26
4
Medium Priority
?
1,128 Views
Last Modified: 2012-05-08
I want to do this

<asp:HyperLink runat ="server"
                                NavigateUrl="javascript:var w=window.open('fbtro.aspx?doff= <%# Eval("lngDoffID") %>','', 'width=625,height=500,scrollbars=0,resizeable=0')"
                                ID="Hyperlink1">
                                <%# Eval("lngDoffID") %>
                            </asp:HyperLink>

and NavigateUrl doesn't like the embedded <%# Eval("lngDoffID") %>

If I do this...

 NavigateUrl="javascript:var w=window.open('fbtro.aspx','', 'width=625,height=500,scrollbars=0,resizeable=0')"

it will open fbtro.aspx just like I want but with the Eval in there I get a 'server tag not well formed'

I can't figure out how to "form" it ?

Thanks in advance.

0
Comment
Question by:revstudio
  • 2
4 Comments
 
LVL 11

Expert Comment

by:nordtorp
ID: 26125767
Hello revstudio,

Maybe you could try something like this:

<asp:HyperLink runat ="server"
                                NavigateUrl="javascript:var w=<%#('"window.open('" + "fbtro.aspx?doff=" + Eval("lngDoffID") +"') %>','', 'width=625,height=500,scrollbars=0,resizeable=0')"
                                ID="Hyperlink1">
                                <%# Eval("lngDoffID") %>
                            </asp:HyperLink>

It might happen that you have to change a little bit, but something like that could help you.
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 26126135
0
 
LVL 29

Accepted Solution

by:
Kumaraswamy R earned 750 total points
ID: 26126147
0
 

Author Closing Comment

by:revstudio
ID: 31670089
<script type="text/javascript">
    function showDoffDetails(doffID) {
        window.open("fbtro.aspx?doff=" + doffID, "",
        "toolbar=0,width=800,height=600,scollbars=0,resizeable=0");
    }
</script>

 
                                <%# Eval("lngDoffID") %>
                           
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question