By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,892 Members | 1,274 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,892 IT Pros & Developers. It's quick & easy.

Logins

P: n/a
Hi,

I have a web application, and a page...

this page has a usercontrol with imagebutons that its a menu, and depending
of the image button i click in the menu the center part of the page its
reloaded, and change...(i load in the center another usercontrol depending of
the user clicks)....

One of this center part usercontrols its a login with 2 textboxes,
(username, and password) and a button...

My question is that.
I would like to store into the session if the user makes login, and put a
cookie too...

What its the best way to do that?

Any advice would be grateful,
--
Thanks
Regards.
Josema
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Josema,

That's simple. When your pages processes the action from the button
click (by default, if it is in web forms, clicking the button should cause a
postback), you can just set the cookie in the Request that is returned to
the user (there should be a Cookies property exposed).

How you log in is up to you. You can validate against your own
credential store, or let IIS/ASP.NET handle it for you.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Josema" <Je******@ocu.org> wrote in message
news:9E**********************************@microsof t.com...
Hi,

I have a web application, and a page...

this page has a usercontrol with imagebutons that its a menu, and
depending
of the image button i click in the menu the center part of the page its
reloaded, and change...(i load in the center another usercontrol depending
of
the user clicks)....

One of this center part usercontrols its a login with 2 textboxes,
(username, and password) and a button...

My question is that.
I would like to store into the session if the user makes login, and put a
cookie too...

What its the best way to do that?

Any advice would be grateful,
--
Thanks
Regards.
Josema

Nov 16 '05 #2

P: n/a
you are able to set: Session["variable"] on the login page and you can
retrieve that value on every page. If you close your browser you session
will be lost and user will have to log back in. If you use cookies than
that's a different story.
Everything else was said by Nick

--
in**@dowhileloop.com
http://dowhileloop.com website development
http://publicjoe.dowhileloop.com -- C# Tutorials

"Josema" <Je******@ocu.org> wrote in message
news:9E**********************************@microsof t.com...
Hi,

I have a web application, and a page...

this page has a usercontrol with imagebutons that its a menu, and depending of the image button i click in the menu the center part of the page its
reloaded, and change...(i load in the center another usercontrol depending of the user clicks)....

One of this center part usercontrols its a login with 2 textboxes,
(username, and password) and a button...

My question is that.
I would like to store into the session if the user makes login, and put a
cookie too...

What its the best way to do that?

Any advice would be grateful,
--
Thanks
Regards.
Josema

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.