473,466 Members | 1,364 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Creating a "logged out" object

UPon a user succesfully logging in, i'm having trouble creating a "log
out" link on a protected page so that users can end their session (i'm
more used to classic asp with this). Below is my subroutine to check
for login, as i want to find a way to reverse " Session("ok") ="yes" "
for a log out object:

Sub dologin(Source as Object, E as EventArgs)
Dim strConn as string =
"SERVER=xxxxxxx;DATABASE=xxxxxx;UID=xxxx;PWD=xxxx; "
Dim MySQL as string = "Select name,password,usid from authusers " & _
"Where name = '" & lgname.text & "' and password = '" &
lgpassword.text & "'"
Dim MyConn as New SQLConnection(strConn)
Dim objDR as SQLDataReader
Dim Cmd as New SQLCommand(MySQL, MyConn)
MyConn.Open()
objDR=Cmd.ExecuteReader(system.data.CommandBehavio r.CloseConnection)

if Not objDR.Read() then
label1.text = "<i>Sorry - your user ID & password were not
found</i>"
objDR.Close
Myconn.Close
else
objDR.close
Myconn.Open
objDR=Cmd.ExecuteReader(system.data.CommandBehavio r.CloseConnection)
Session("ok") ="yes"
response.redirect("protectedpage.aspx")

End If
End Sub
Nov 22 '05 #1
0 1316

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Akhlaq Khan | last post by:
we are developing an intranet application (web based) which needs to detect the logged in user ID of the user hitting the website. the intranet is huge and based on win2k active directory (around...
0
by: Chumley the Walrus | last post by:
UPon a user succesfully logging in, i'm having trouble creating a "log out" link on a protected page so that users can end their session (i'm more used to classic asp with this). Below is my...
3
by: Henne | last post by:
Hello, in VB6 we werr able to make ActiveX-DLL's (In Process Components) and ActiveX-Exe (Out Of Process Components). Out Application is build of one main application that starts other...
2
by: Berata | last post by:
Hello all, in VB6 we were able to create ActiveX-DLL's (In Process Components) and ActiveX-Exe's (Out of Process Components). We habe build up an application that exists of an main module...
1
by: Roy Danon | last post by:
Hi, For some reason while trying to retrieve an existing value from the session object I recieve the following error : Microsoft VBScript runtime (0x800A0007) Out of memory: 'session' What...
14
by: stic | last post by:
Hi, I'm in a middle of writing something like 'exception handler wraper' for a set of different methodes. The case is that I have ca. 40 methods form web servicem, with different return values...
2
by: yotaxp | last post by:
Hello, all. This line has been pestering me, and I can't seem to figure out why the problem is occuring. I'm trying to paint a GraphicsPath onto a Bitmap, using the Graphics class, but it...
4
by: Rachel McConnell | last post by:
Hello, I have a Java web application using Hibernate to connect to a PostgreSQL backend. I am seeing the below stack trace during processing of a set of data consisting of around 1000 objects;...
1
by: Dave | last post by:
Calling an external webservice, sometimes we get "operation has timed out." the full stack trace is below (I've just replaced personal info). The webservice provider suggested it timed out trying...
7
by: John Layton | last post by:
Hi there, Is it possible to pass null to a function taking an "out" (or "ref") parameter in C#. I'd like to do something like the following (which doesn't compile of course). Thanks in advance....
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.