Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Setting ASP:Hyperlink controls  NavigateURL attribute to somepage.aspx?file=<XPath(@path)> where path is some html file on server

Posted on 2008-06-18
2
Medium Priority
?
823 Views
Last Modified: 2012-06-27
n my aspx file i am using asp:hyperlink

            <asp:HyperLink ID="link" runat="server" Text='<%# XPath("@id") %>' NavigateUrl= 'Somepage.aspx?file=  <%# XPath("@Path") %>'
                    Font-Names="Verdana" Font-Size="X-Small"></asp:HyperLink> |

and getting the error "the server tag is not well formed". for NavigatURL attribute
without - Sectionlayer.aspx?file=  part i am getting the Xpath value correctly in NavigateUrl.
there is some problem in quotes in NavigateURL attribute.can u plz let me know where am i going wrong in Navigateurl attribute.
0
Comment
Question by:Nileshlulla
2 Comments
 
LVL 4

Assisted Solution

by:itzdarc
itzdarc earned 400 total points
ID: 21819269
The <%# tag takes over the entire property value... which means you can't do "somepage.aspx"<%#...

The good news is that you can make this execute code also... so you can do...

NavigateURL='<%# "Somepage.aspx?file=" + XPath("@id") %>'


Below:


<asp:HyperLink ID="link" runat="server" Text='<%# XPath("@id") %>' NavigateUrl= '<%# "Somepage.aspx?file=" + XPath("@Path") %>' Font-Names="Verdana" Font-Size="X-Small"></asp:HyperLink>
0
 

Accepted Solution

by:
Nileshlulla earned 0 total points
ID: 21939640
thx itzdarc for ur time.

But i got the solution and it is :
NavigateUrl= '<%# XPath("@id", "article.aspx?file={0}")%>'

can anyone help me for the pager control with numeric and previous and next button in the below order.
previous  1 2 3 4 5 6 7 .... 10 20  next.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

916 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