Store and get cookies information by user??

In my report , i have 2 report type: Weekly and Monthly.  if the user login next time, i want to disply the selection which lastly selectly by the user accordingly. If the user1 select Weekly then next time i want to display weekly option.  if the user5 select monthly then next time i want to display monthly for that user

I am new to cookies.  please give me better/faster solution. 

Thanks in advacne
0
Zack
9/26/2005 7:06:19 AM
asp.net.getting-started 91979 articles. 4 followers. Follow

2 Replies
507 Views

Similar Articles

[PageSpeed] 9

Here is an example of adding a cookie in C#

string ReportType = "Weekly";
HttpCookie Cookie =
new HttpCookie("ReportType"
, ReportType );
Cookie.Expires = DateTime.Now.AddYears(
10
);
Response.Cookies.Add( Cookie );

Here is an example of retrieving a cookie in C#

string ReportType = "Weekly"; // Set to default value incase first visit or cookie deleted

// Check the cookie exists
if( Request.Cookies["ReportType"] != null
)
{
    ReportType = Request.Cookies[
"ReportType"
];
}

If you don't use C# and can't do the conversion let me know
0
UkBtlog
9/26/2005 11:49:47 AM
thanks you very much UkBtlog
0
Zack
9/29/2005 6:36:27 AM
Reply:

Similar Artilces:

POST GET GET GET GET... WTH?
Hi, I'm at a loss to explain this... I have an ASPX page that I can't always navigate to. When I developed the app (it's Starter Kit Portal-based), I did it on my LAN and have had no trouble accessing the page. However, upon deployment, I see the following behavior: 1. POST request goes out looking for MyForm.aspx 2. GET request for MyForm.aspx 3. GET request for MyForm.aspx 4. ... X. GET request Sometimes, the page finally loads. Other times, it just ends up blank. Many times, it doesn't load at ALL the first POST - I just get a "The pa...

How to store and get cookies information in DNN 212 portal?
In my report , i have 2 report type: Weekly and Monthly.  if the user login next time, i want to disply the selection which lastly selectly by the user accordingly. If the user1 select Weekly then next time i want to display weekly option.  if the user5 select monthly then next time i want to display monthly for that userI am new to cookies.  please give me better/faster solution.  whether storing info on protal or cache? and also give me coding samples.  I am using DNN 212 and ACCESS databasemillions of thanks in advance i have one solution, but i don't know ...

Performance issues on storing user information in cookies and with .net session
Hi All, First of all let me make clear the scenario. The logged-in user state can be maintained in the client using the cookies [yahoo and google follows this approach]. So, if cookies are not enabled in the client browser this doesnt work Using .net the user state is generally maintained using sessions. Even if the cookies are disabled the approach works fine. Now, the question is which of the two approaches has better performance (neglecting the security issues) and which of them is better suited for an Intranet application built in .net. Do discuss. Regards, Chanchal Cookie...

trying to get started and i am getting this error
when i go to http://www.porkchopsplayground.com, i get: DotNetNuke Upgrade Error The Assembly Version ( [ASSEMBLYVERSION] ) does not match the Database Version ( [DATABASEVERSION] ) ERROR: Could not connect to database. Could not find file 'd:\hosting\nmoran26\Providers\DataProviders\AccessDataProvider\DotNetNuke.mdb'. Any suggestions will be appreciated. Thanks, Nicole Do you have a username and password set on your database? Make sure you follow the steps mentionned in the Readme.txt located in the documentation folder. In any case make sure your credentials for yo...

stored procedure to get all users or all users of a specific country
hi alli've got two tables called "webusers" (id, name, fk_country) and "countries" (id, name) at the meantime, i've a search-page where i can fill a form to search users. in the dropdown to select the country i included an option which is called "all countries". now the problem is: how can i make a stored procedure that makes a restriction to the fk_country depending on the submitted fk_country parameter?it should be something like SELECT * FROM webusers(if @fk_country > 0, which is the value for "all countries"){    WHERE ...

How to get user name and user id from membership cookie
Hello,Is there any way to get the users logged users name and user id from the login cookie? I am using asp.net membership class. And also wanted to know if GetUserName() calls the database when ever it is called? thanks for any commentslistsergeant.com public static String GetUserName (HttpContext context) {    return context.User.Identity.Name;  } Try this K.Mohamed Faizal Solution Architecthttp://faizal-comeacross.blogspot.comPlease remember to click "Mark as Answer" on this post if it helped you Let say if you want to get Windows username then make sure...

how to get start with .NET
the net help people installed  to my desktop 1-microsoft visual studio .NET enterprise developer 2003 2-microsoft .NET framework 1.1 what else do i need ...???  and how can i try with some simple code in VS.Net and run it to see wat happen...????? please help If you want to develope web applications, then you'll also need IIS on your PC.  That'll require XP-Professional or Windows 2000/2003, but XP-Home edition won't allow IIS installation. As for how to get started, you can search the web for some tutorials or buy a good book on VS.  The topic is way too vast to...

How do I get user information??
Newbie here... How do I get user information once they have logged in? I'd like to create custom content, based on who the user is - so my custom modules need to know who is logged in. Also, I'd like to capture additional info when they register. Thanks for your help. As others have noted, the sparse documentation doesn't help us new guys. . These forums sure do, though! Thanks in advance... Randy Randy, if you are after the users information you need to first create a UserController, then call the function GetUser and pass the UserId property in the instance of your ...

Get User information
Hi, I want to grab the user on the windows machine on the client side.  I would like to grab their name and such but am confused as to how to do this.Someone was telling me about active directory and another person said use HttpContext.Current.User.Identity.Name.  I tried using HttpContext.Current.User.Identity.Name and it givesme a string= "". ThanksJerm ...

Getting User Information
I have pages that use the same user info repeatedly. I can get the user ID with string strID = Membership.GetUser(strUserName).ProviderUserKey.ToString();  That ID is also a column in my own [riders] table. So I can pull address, etc., by calling a function getUserInfo(strID) Right now, however, I am having to put that function in every page that I need the info. Could I create a user or server object that would return a dataset or table that could be called from an aspx form without having to paste the method into every page that calls it? I assume that this can be done, just looki...

Getting Start With .net
hi i'm intersted to learn asp.net (vb or delphi) . i programming with delphi6 but i'd like to tp know something about programming in internet specially with .net . i hear about microsoft.net with delphi 7 that i can programming with delphi in .net .... is it right ? what 's our opinian about it ? and better to learn Vb.Net or continu with delphi(or delphi.net) thanks. Ali Darabian I think there is some support for Delphi in .Net. However, you will find much more support from the user community if you choose a more popular language such as VB.Net or C#. Since your al...

get user information
I am wondering if someone can show me how to get infromation about the users. Specifically, the job (the syntax) the logged on user's doing. I saw the answer somewhere but forgot where. Thanks. Bin get the spid from sysprocesses and do: sp_showplan <spid>, NULL, NULL, NULL "Bin Yu" <b-yu2@uchicago.edu> wrote in message news:3C3F0E36.CE156215@uchicago.edu... > I am wondering if someone can show me how to get infromation about the > users. Specifically, the job (the syntax) the logged on user's doing. > I saw the answer somewhere but for...

getting information about the user
I'm a newcomer in this field.Therefore it's quite possible my questions are rather stupid. Sorry..But, 1)Whether the user must be registered in NT domain before he can access Jaguar server located in the same domain? (OS Auten. is turned on.) 2) Whether a user from the NT domain that is different from the domain where the Jaguar server is located can access the Jag. server. 3)How can I get information about the user who instantiated the Jaguar component (PB NVO)? Thanks in advance. Viktor. The user id and password used to connect to the server is what aut...

getting started in VS2005 C# which book should I get
Hello, I am getting started with VS2005, I have use VS2003 but not very much -(I did 4 small applications in it),  I am wondering which book you would recommend to learn the new features of VS2005, while learning more of C# programing in general There some links to good books in this thread i posted : http://forums.asp.net/thread/1489422.aspx Also these two make good reference material  Professional Visual Studio 2005 (Programmer to Programmer)   Microsoft Visual Studio 2005 Unleashed  So far I recommend Wrox's C# 2005  Read the beginning chap...

Web resources about - Store and get cookies information by user?? - asp.net.getting-started

Information - Wikipedia, the free encyclopedia
Information (shortened as info or info. ) is that which informs, i.e. an answer to a question, as well as that from which knowledge and data ...

InformationWeek – Latest Information Technology (IT) news & IT articles - Technology news - IT magazine ...
InformationWeek provides latest Information technology (IT) news online & articles and publishes latest tech news & IT magazine for Indian IT ...

ACT anti-domestic violence boss calls for better information sharing across sector
... ACT government will seek to strike a&nbsp;balance between&nbsp;victim safety&nbsp;with privacy concerns as it eyes better ways of sharing information ...

Queensland weather: Latest storm warning information
PARTS of Queensland were hit by severe storms, with golf-ball-size hail in the Granite Belt Monday afternoon.

Magnetic protein may provide animals with navigation information
What do monarch butterflies, salmon, lobsters, bats, mole rats, and marine nudibranch mollusks have in common? As I'm sure you already knew, ...

Security researchers have discovered more information on how the Sony hackers managed to stay undetected ...
More details of the hack that wiped out Sony Pictures' computer systems and resulted in thousands of internal emails and documents leaking online ...

White House offers states more information on refugees
Governors are still clashing with the administration over whether to admit Syrian refugees into their states

VTech hack exposes personal information of 5 million adults and children
Another data breach? Won't someone please think of the children?

Is The Freedom Of Information Act Stifling Intellectual Freedom?
The time to be surprised about FOIA requests is over: Scientists need to be on their guard and harness this digital world for themselves.

THE NUMBER GROWS Nearly 1,000 Clinton emails had classified information
THE NUMBER GROWS Nearly 1,000 Clinton emails had classified information

Resources last updated: 12/6/2015 8:14:41 AM