Click here to Skip to main content
16,007,126 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Exit the application Pin
Colin Angus Mackay26-Apr-07 14:39
Colin Angus Mackay26-Apr-07 14:39 
QuestionAbout Web application Pin
hahii26-Apr-07 11:45
hahii26-Apr-07 11:45 
AnswerRe: About Web application Pin
Colin Angus Mackay26-Apr-07 14:40
Colin Angus Mackay26-Apr-07 14:40 
QuestionWait Cursor for long running process Pin
Alaric_26-Apr-07 10:39
professionalAlaric_26-Apr-07 10:39 
Questioncookie Pin
hahii26-Apr-07 9:32
hahii26-Apr-07 9:32 
AnswerRe: cookie Pin
netJP12L26-Apr-07 12:01
netJP12L26-Apr-07 12:01 
AnswerRe: cookie Pin
Guffa26-Apr-07 13:52
Guffa26-Apr-07 13:52 
QuestionRememberMe checkbox in Login Control Pin
aransiola26-Apr-07 9:17
aransiola26-Apr-07 9:17 
I am getting the error
Object reference not set to an instance of an object

as shown below.

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:
Line 43: chkRemember = FindControl("RememberMe")
Line 44:
Line 45: If chkRemember.Checked = True Then
Line 46: 'cookies are sent to the user's pc using httpresponse
Line 47: Dim oCookie As HttpCookie = New HttpCookie("loginuserid")



My Login_LoggedIn event where the error is breaking is as shown below
======================================================================
Protected Sub Login_LoggedIn(ByVal sender As Object, ByVal e As System.EventArgs) Handles Login.LoggedIn
'This event is fired when the Login button is pressed
Dim chkRemember As CheckBox = New CheckBox

chkRemember = Me.FindControl("RememberMe")

If chkRemember.Checked = True Then
'cookies are sent to the user's pc using httpresponse
Dim oCookie As HttpCookie = New HttpCookie("loginuserid")

'remove previous cookie
Response.Cookies.Remove("loginuserid")

'create new cookie
'Response.Cookies.Add(oCookie)

'Assign values to cookie's subkeys
oCookie("user") = Login.UserName 'oCookie.Values.Add("user", Login.UserName) '
oCookie("pass") = Login.Password
oCookie.Expires = DateTime.Now.AddDays(15)

'Add the cookie to the Cookies collection
Response.Cookies.Add(oCookie)
End If
End Sub

pls help

t.aransiola
AnswerRe: RememberMe checkbox in Login Control Pin
Venk25927-Apr-07 2:05
Venk25927-Apr-07 2:05 
QuestionSqlserver connecting problem Pin
alav26-Apr-07 5:22
alav26-Apr-07 5:22 
AnswerRe: Sqlserver connecting problem Pin
kubben26-Apr-07 5:45
kubben26-Apr-07 5:45 
Questionproblem with gridview onclick event Pin
tronix0126-Apr-07 5:21
tronix0126-Apr-07 5:21 
AnswerRe: problem with gridview onclick event Pin
varshavmane26-Apr-07 19:04
varshavmane26-Apr-07 19:04 
GeneralRe: problem with gridview onclick event Pin
tronix0126-Apr-07 21:14
tronix0126-Apr-07 21:14 
GeneralRe: problem with gridview onclick event Pin
varshavmane26-Apr-07 23:06
varshavmane26-Apr-07 23:06 
Questionglobal variables Pin
Tenk26-Apr-07 5:12
Tenk26-Apr-07 5:12 
AnswerRe: global variables Pin
kubben26-Apr-07 5:46
kubben26-Apr-07 5:46 
AnswerRe: Session Varibles Pin
Ibuprofen26-Apr-07 10:48
Ibuprofen26-Apr-07 10:48 
GeneralRe: Session Varibles Pin
Tenk27-Apr-07 23:50
Tenk27-Apr-07 23:50 
GeneralRe: Session Varibles Pin
Ibuprofen28-Apr-07 6:26
Ibuprofen28-Apr-07 6:26 
QuestionA connection with the server could not be established. Pin
MissionSuccess26-Apr-07 3:44
MissionSuccess26-Apr-07 3:44 
AnswerRe: A connection with the server could not be established. Pin
marky77726-Apr-07 4:28
marky77726-Apr-07 4:28 
Questionwebsite is downloading the page instead of displaying it Pin
RoedRunner26-Apr-07 3:32
RoedRunner26-Apr-07 3:32 
AnswerRe: website is downloading the page instead of displaying it Pin
Russell Jones26-Apr-07 4:15
Russell Jones26-Apr-07 4:15 
QuestionEPS File to JPG Pin
dptalt26-Apr-07 3:18
dptalt26-Apr-07 3:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.