Solved

Getting Hyperlink NavigateUrl property set to parameter with value XPath attribute

Posted on 2008-06-18
2
1,999 Views
Last Modified: 2013-11-07
in my aspx file i am using asp:hyperlink

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

and getting the error "the server tag is not well formed".
without - Sectionlayer.aspx?file=  part i am getting the Xpath value correctly.
there is some problem in quotes can u plz let me know where am i going wrong.

this hyperlink i am using in a repeater control to create a dynamic paging with html files linked to it.
can u also show some good paging samples with numeric pages and  previous and next button.with good hover and link visited hyperlink button style. In the format as below:

previous  1 2 3 4 5 6 7 .... 10 20  next.
<asp:HyperLink ID="link" runat="server" Text='<%# XPath("@id") %>' NavigateUrl= 'Sectionlayer.aspx?file=  <%# XPath("@Path") %>'

                    Font-Names="Verdana" Font-Size="X-Small"></asp:HyperLink> |

Open in new window

0
Comment
Question by:Nileshlulla
2 Comments
 
LVL 25

Assisted Solution

by:apeter
apeter earned 100 total points
ID: 21812365
Try to add those attributes in the event "OnitemBound" event of the repeater control. So that can easily form the URL in the code behind.
0
 

Accepted Solution

by:
Nileshlulla earned 0 total points
ID: 21812931
Again in ItemDataBound event of repeater i would have faced the same problem in assigning value for the queystring file to Xpath.as the problem i thought was in incorrect quotation mark that i had put.

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

Thanks for all ur help i appreciate the valuable time you had spent on figuring this out.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

929 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now