Solved

Getting Hyperlink NavigateUrl property set to parameter with value XPath attribute

Posted on 2008-06-18
2
1,998 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

14 Experts available now in Live!

Get 1:1 Help Now