Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have catagories shown in hyperlink.. progrmmers here told me to use querystring to filter the data of catagories using a querystring.

can anyone tell me how to set databinding in navigate url to filter the data on the bases of categories,


ASP.NET
<asp:HyperLink ID="HyperLink1" runat="server" 
                            NavigateUrl='<%# Eval("CategoryID", "~/ProductCatalog.aspx?CategoryID={0}") %>' 
                            Text='<%# Eval("CategoryName") %>'>



how to use querystring in it.. and how to retrive it to other page
Posted
Updated 24-Aug-11 0:09am
v3

You can use DataBinder.Eval as shown here[^] and here[^].
 
Share this answer
 
C#
<asp:hyperlink xmlns:asp="#unknown">
        runat="server"  
        id="id1"  
        navigateurl='<%# String.Format("navigationPage.aspx?var1={0}&var2={1}", Eval("Dividents"), Eval("Field2"), Eval("Field3")) %>' 
        text='<%# Eval("part1") %>'> 
</asp:hyperlink>
 
Share this answer
 

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