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
817 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Assisted Solution

by:itzdarc
itzdarc earned 100 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

617 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