如何在asp.net的收藏夹列表中添加表 [英] how to add table in favourite list in asp.net

查看:72
本文介绍了如何在asp.net的收藏夹列表中添加表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在热点列表中添加表格...

名称:s
中间名:M

ViewDetails(链接按钮)添加到收藏夹(链接按钮)
当我单击添加到收藏夹链接按钮时,它应该保存在数据列表的添加到收藏夹列表页面中.任何人都可以帮我吗?

hi how to add table in hotlist...

Name:s
Middle Name:M

ViewDetails(link button) Add TO Favorite(link button)
when i click to add to favorite link button it should save in add to favorite list page in data list..can any one help me?

推荐答案

只需更新状态在您的表中.考虑您的表包含以下数据
Just update the status in your Table. Consider your table contains the below data
-------------------------------------
Name          MiddleName   IsFavorite
-------------------------------------
AAAAAAA       1111111111       Y
BBBBBBB       2222222222       Y
CCCCCCC       3333333333       N
DDDDDDD       4444444444       Y
EEEEEEE       5555555555       N
-------------------------------------


如果要将记录添加到收藏夹列表,请进行更新.


If you want to add a record to favorite list then update.

UPDATE [Table] SET IsFavorite='Y' WHERE [Name]='DDDDDDD'


使用以下查询获取收藏夹列表


Use the below query to get favorite list

SELECT * FROM [Table] WHERE IsFavorite='Y'


使用上面的查询,您可以将数据拉到前端,然后将其绑定到Gridview或其他东西.


Using the above query you can pull the data to frontend, then bind it to Gridview or something.

DataTable dt = GetFavoriteList();//Custom function to get data from database
GridFavorites.DataSource = dt;
GridFavorites.DataBind();


下载以下开源项目并查看体系结构:
用于ASP.NET 3.5的作业站点入门工具包
开源C#,VB.NET,ASP.Net项目
Download the following open source project and review the architecture:
Jobs Site Starter Kit for ASP.NET 3.5
Open Source C#, VB.NET, ASP.Net Projects


这篇关于如何在asp.net的收藏夹列表中添加表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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