如何在asp.net中的cookie中提取特定信息 [英] how to extract specific information in cookie in asp.net

查看:71
本文介绍了如何在asp.net中的cookie中提取特定信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是一个初学者,正在Visual Studio 2008中的asp.net平台上构建网站.我已经创建了一个基本的登录系统.现在,我使用cookie在其中存储用户名,以便可以使用它来访问相应的数据库.

例如.用户名abc登录的人.它被重定向到个人资料页面.现在,我想在列表视图中显示他的个人资料详细信息,但无法执行.因此,我想使用存储在cookie中的用户名来填充SQL WHERE条件,以搜索该人的表详细信息并将其填充在LIST VIEW中.

那么我如何获得Cookie信息.正如我尝试过的,但我立即访问了所有信息,例如"2011年5月9日12:22:20 uid = abc"

如果登录后还有其他显示特定注册用户信息的方式,请帮帮我.

多亏了U.

hi to all,

I am a beginner and working on building websites on asp.net platform in visual studio 2008. I have created a basic login system. Now I used cookie to store username in it so that I can use it to access the respective database.

For example. a person with username abc logins. It is redirected to profile page. Now here I want to show his profile details in a list view but could not do. So I thought to use username stored in the cookie to fill the SQL WHERE condition to search the table details of that person and fill it in the LIST VIEW.

So how can I get the cookie information. As I have tried but I access all the information of it at once like "9 may 2011 12:22:20 uid=abc"

If there is another way of showing the information of a particular registered user after he log in then please help me out.

Thanks to U.

推荐答案

这篇文章也可以帮助您:
This article too would help you out: Beginner''s Guide To ASP.NET Cookies[^]


请参见 ^ ]-非常简单!
See MSDN Reading a Cookie[^] - it''s pretty simple!


这篇关于如何在asp.net中的cookie中提取特定信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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