Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have developed a windows application for windows mobile device (SmartDevice Project VS 2008 C#).
In a login form, there is a remember me checkbox option.

My question is how to remember username and password for the windows application.
Is there any concept like cookie for win application.


Please help me.

Thanks
Posted

1 solution

1.There is no cookies for windows desktop application, and cookies are managed by the web browsers.

2.The similar solution in the case of windows application is to save the user credentials in the current user settings. For doing this by using application properties you must add in the application configuration two user settings for user name and password, then after login successfully to save the user inputs.

NOTE: In this way also other user preferences (regarding the current application) could be saved (like current folder, application settings, etc).

3.For details about user settings see next article: http://msdn.microsoft.com/en-us/library/aa730869(v=vs.80).aspx[^]
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 18-Sep-14 2:15am    
5ed.
—SA
Raul Iloc 18-Sep-14 2:17am    
Thank you for your vote!
Ganesh11021423 18-Sep-14 2:38am    
Thanks Raul Iloc

I followed the link you suggested.
In the solution explorer, i expand the properties.
But there in no setting file in properties node of the project and i am not able to access
Properties.Setting in cs file.
Do i need to add any reference or file in a project or else is there any solution for Smart project.

Please help me.

Thanks
Raul Iloc 18-Sep-14 2:42am    
You have to select the project project in Solution Explorer, then to select the "Properties" from context menu, and after that select the "Settings" from the left part of the new (project property) page. You have also these details in the MSDN link that I gave you in my 3rd point of my solution above!
Ganesh11021423 18-Sep-14 7:19am    
Thanks Raul Iloc
I also followed the MSDN link.
But there is no any setting in project.
Can we do something in app.config file.

Thanks

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