根据类别过滤产品 [英] filtering the products on the bases of catagory

查看:70
本文介绍了根据类别过滤产品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网格视图中有一些类别.在超链接中显示..

例如,我在网格视图中显示的类别中有鼠标,键盘等.当我单击任何类别时,可以说鼠标..该页面将重定向到productcatalog.aspx页面,其中显示所有可用品牌的鼠标..

但是问题是这样的.它不是从鼠标类别中过滤产品.而是在数据库中显示所有产品.这是iam编写的代码..

i have some catagoriens in a grid view.. which are shown in hyperlinks..

e.g i have mouse, keyboards e.t.c in catorgiries shown in gridview. when i click on any catagory lets say mouses.. the page will redirct to productcatalog.aspx page showing the mouse of all the brands available..

but the problem is that. its not filtering the products from the mouse catagory.. but showing all the proucts in the database. this is the code iam writing..

<asp:HyperLinkField DataNavigateUrlFields="CategoryID" 

                    DataNavigateUrlFormatString="~/ProductCatalog.aspx?CategoryID={0}" 

                    DataTextField="CategoryName" HeaderText="Categories" />





现在在productcatalog.aspx页面上,我如何在querystring





now on productcatalog.aspx page how i can filter the products on the bases of querystring

推荐答案

的基础上过滤产品您不应在客户端上进行过滤,而应在服务器上进行过滤.没有理由发送不使用的数据.
You should not filter on the client, but on the server. There is no reason to send data you''re not going to use.


这篇关于根据类别过滤产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆