Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My below hyperlink control is working fine with the code.. only what i want is to add page23.aspx?cat=shoes in front of the navigate url property. i am trying but when i do like this it doesn't add area with navigateurl.. it shows full text instead of retreving area from database..

C#
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl= '<%# DataBinder.Eval(Container.DataItem, "area") %>'> <%# DataBinder.Eval(Container.DataItem, "area") %>
Posted
Updated 3-Oct-13 8:31am
v2
Comments
Azee 3-Oct-13 14:43pm    
Give an example of the output you are expecting after combining page23.aspx?cat=shoes with navigateURL and please specify what does "area" field return?

1 solution

XML
you should try java script for that hope your problem will resolve. i have give a sample please check and modify as per your requirement
the javascript code is as :

<script type="text/javascript">
        function openWindowForNavigation() {
            // getting the current url with query string
            var query = document.location.href;
            window.open(query +'&cat='+50);
        }
    </script>

and your hyperlink is
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="javascript:openWindowForNavigation();">HyperLink
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900