CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 10/18/2006 5:49:11 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 14 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
alphaswoosh
Asp.Net User
How do I know it is log in or not?10/18/2006 5:49:11 PM

0/0

I have 2 buttons in the login.aspx. The first button is submit button which is check the if username and password are matched with the database and another vote button is to redirect to a vote.aspx.

By right, after I click the submit button, it wont redirect to any page but is to authenticate the username and password. After login sucessfully, I want to display something like "Welcome, user" in the same login.aspx. The page will redirect to vote.aspx until vote button is clicked. and the vote.aspx should check if the user is loged in. If the user is not log in then will redirect back the login.aspx.

 My problems is after log in sucessfully, I try to click the vote.button, but it wont redirect to the vote.aspx page.

login.aspx

if submit button clicked

dim status as integer = 0 **this is global variable in log in page**

If ( ValidateUser(txtUserName.Text, txtPassword.Text) ) Then
            lblDisplay.Text = "Welcome, " & User.Identity.Name
            status = 1
End if

if vote button clicked

If status = 1 then
        FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, true)
        status = 0
End if

vote.aspx

If User.Identity.IsAuthenticated Then
     label1.Text = "Current User : <b>" & User.Identity.Name & "</b>" & _
        "<br><br>Authentication Used : <b>" & User.Identity.AuthenticationType & "</b>"
      'delete the users auth cookie and sign out
else
       Response.Redirect("login.aspx") 
End If

Hope those experts can help me out... Thanks.

 

 

 

nadigadda
Asp.Net User
Re: How do I know it is log in or not?10/18/2006 9:52:20 PM

0/0

Try with FormsAuthentication.SetAuthCookie(txtUserName.Text, false) for the User before diplaying the welcome message in IF block. And you can directly Redirect the page to vote.aspx page when you click vote button.

alphaswoosh
Asp.Net User
Re: How do I know it is log in or not?10/19/2006 2:18:13 PM

0/0

It is working now. Thanks.

If ( ValidateUser(txtUserName.Text, txtPassword.Text) ) Then
            FormsAuthentication.SetAuthCookie(txtUserName.Text, false)
            lblDisplay.Text = "Welcome, " & User.Identity.Name
End If

But I am not able to display the "User.Identity.Name" . May I know how to display the name besides using txtUserName.Text?

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Differentiation in Practice: A Resource Guide for Differentiating Curriculum, Grades 9-12 Authors: Carol A. Tomlinson, Cindy A. Strickland, Pages: 369, Published: 2005
The Black Swan: The Impact of the Highly Improbable Authors: Nassim Nicholas Taleb, Pages: 366, Published: 2008
Teach Your Child to Read in 100 Easy Lessons Authors: Siegfried Engelmann, Phyllis Haddox, Elaine Bruner, Pages: 395, Published: 1986

Web:
How do I know if my log files are protected or not? I just became aware of this potential issue how do i know if my log files are protected or not?
Six Things Everyone Should Know about JE Log Files Six Things Everyone Should Know about JE Log Files. JE log files are not like the log files of other database systems. Nor are they like the log files or ...
Know The Transaction Log – Part 4 - Restoring Data - B ... Apr 22, 2008 ... GAM , SGAM and PFS Pages can not be restored. For more details see Books Online. With this I conclude my Know The Transaction LOG Series. ...
SQLThoughts: KNOW THE TRANSACTION LOG –PART 2 Mar 13, 2008 ... Because these recovery model can not log these operations as they run very fast. ... Know The Transaction Log – Part 4 - Restoring Data. ...
Anyone know if there's a discussion group about log parser itself ... Message from discussion Anyone know if there's a discussion group about log parser itself (not the visual product of this list)? ...
Glob-a-log » Blog Archive » Ten things you did not know about ... Ten things you did not know about Barack Obama ... 2) He is not a Christian. He’ s not even a Muslim. ... Glob-a-log is proudly powered by WordPress ...
How does compiz know to start at login - Ubuntu Forums How does compiz know to start at login Desktop Effects & Customization. ... I figured that was where to go, but it's not clear to me how to ...
Reset Administrator Password but need to know how to login as ... Unfortunately, I still cannot log on as I don't know how to log on without .... Local Administrator Login Not Working After Resetting Pwd ...
Will the network guys know if I log in as an administrator ... what are the odds that the adminstrators will know if I log into MY MACHINE (not the network) with an administrator password? ...
Safety Daily Advisor : OSHA’s 300 Log: What You May Not Know About It Mar 3, 2008 ... OSHA’s 300 Log: How much do you know about it? Here’sa quick course on the basics.

Videos:
Bobby Hull and son Log Cabin Syrup Commercial not Brett Here is short spot with Bobby Hull and his son probably Bobby Jr. in a Log Cabin Syrup commercial. A number of people have posted that this is not Br...
Beyond Gigs of Log Data Google Tech Talks January 30, 2007 Abstract The growing diffusion of information technologies influences people's life chances and raises questions...
CCP Oughta Know Eve Online is a massively multiplayer space sim, where 15,000 to 40,000 players are logged in at any one time. The game is massive in scope, but bat...
Naruto chat #3-The return, introduction, and fight! Hey Y'all! Third one's up and ready to be viewed! If you have seen the first episode then you should be happy to know that in this one u will be able...
Hourglass by LOG (standard tuning not dropped D) Hi this is a video of lamb of god hourglass played by me a Bangladeshi guy living in NYC, hope you enjoyed it, and please comment on what you think a...
How do you know you play on an EU server? This occured during a server crash at the same time I tried to log out, thus giving me the "You are not in a guild" message every time I tried to exi...
Just So You Know requested by: thefoxhound song: Just So You Know by Jessie McCartney Balto (c) Universal Studios
Vloggety McVlog! It's not Vee-Log, bitches! Yeah so you know one of my pet peeves is poor spelling and grammar? Well this kind of falls into that category. The BBC described Queen Rania's stuff...
How to log the IP Adress and date of users on your site? Do you want to know how you can log the IP Adress of users on your site? It can with PHP, and it's easy! You can do it in 2 minutes, but i've maked m...
DJ Josh Gig Log 14 - Wedding With Ray (8-16-2008) First off, just saying, this is NOT my wedding. This was an offer Ray threw me saying "you looking for some experience going into your first". The w...




Search This Site:










dnn 4.0 critical error in file manager functions

javascript intellisense question

xml documentation

"system.web.dll" not found ???

c# two-level tabs's source code

new italian dotnetnuke community

.net class scope prob :(

error: make sure personalization is enabled for the current user

how to set user firstname, lastname, address using activedirectorymembershipprovider

is there anything like cfdump in asp.net 2.0

site vs virtual directory on forms auth?

can't access .asp pages

advice on access data from several tables and displaying to user...

using a component class as a property for a custom control

how should i be managing my web files??

i keep "losing" tracing

what's wrong with it?

opening a blank infopath form from asp.net

how to script out my .mdf database i have in visual studio?

wbh 3.0 launch - server purposing using ads

weird 3.0.1.3 upgrade problem!

classes (extended)

sending mail

base.oninit(e)... pretty messed up...

autocomplete not rendering in firefox

active directory and asp.net

unknown user account

configuration problems w deployment of dnn10(e) and dnn2.0.3 to shared host

create a control like google calendar

errors compiling dotnetnuke

 
All Times Are GMT