Solved

Getting Hyperlink NavigateUrl property set to parameter with value XPath attribute

Posted on 2008-06-18
2
2,002 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

809 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