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
813 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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

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…
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.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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