Click here to Skip to main content
15,898,036 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Parse error message Pin
SHatchard19-Jul-07 6:37
SHatchard19-Jul-07 6:37 
GeneralRe: Parse error message Pin
ASPnoob19-Jul-07 8:39
ASPnoob19-Jul-07 8:39 
Questionsessions again Pin
boyindie19-Jul-07 6:26
boyindie19-Jul-07 6:26 
AnswerRe: sessions again Pin
sathesh pandian19-Jul-07 6:49
sathesh pandian19-Jul-07 6:49 
AnswerRe: sessions again Pin
Manas Bhardwaj19-Jul-07 7:11
professionalManas Bhardwaj19-Jul-07 7:11 
GeneralRe: sessions again Pin
boyindie19-Jul-07 7:50
boyindie19-Jul-07 7:50 
AnswerRe: sessions again Pin
doWhileSomething19-Jul-07 8:19
doWhileSomething19-Jul-07 8:19 
GeneralRe: sessions again Pin
boyindie19-Jul-07 11:15
boyindie19-Jul-07 11:15 
Hi Guys
I just can't get this stupid session to work

I have tried doin in a seperate method and callin that method from the page_load to no avail

once i log in and set the session variable, it jus goes to the next page and does nothin at all, i have even tried returnin the value in a textbox on the second page and i get nothin.

I get value for the session after i set it, so there must be somthin wrong with my page when it is receivin it

any ideas

<code>

I set my session variable equal to the users username once it has been validated as being a valid login

Sub validateLogin(ByVal cmdString)
'Creates object and sets value equal to return value
Dim validation As Object = cmdString.Parameters("?p_valid").Value

'Validates if users login is valid or invalid
If validation = 0 Then
Label1.Text = ("Your Login is not valid")
Else
Dim uname As String = txtUserName.Text

Session("Loggedin") = "Yes"
Session("username") = uname
MsgBox(Session("username").ToString)
checkGroupStatus()
End If

End Sub

What i want to do is place this value in a label

and it jus does nothin

I have it set to a messagebox in this example

any help would be appreciated
cheers boyindie

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="adminHome.aspx.vb" Inherits="adminHome" Strict="true" %>
<script runat=server >
Sub page_load()


MsgBox("username is:" & Session("username").ToString)




End Sub


</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Welcome
<asp:Label runat="server" ID="lblUsername" Visible="true"></asp:Label>
<ul id="navlist">
<!--Navigation menu code-->
<li style="color: black"><a href="adminUserAccounts.aspx">Users </a></li>
<li><a href="">Site Maintenance</a></li>
<li><a href="">Content Manager</a></li>
</ul>
</div>
</form>
</body>
</html>
</code>
GeneralRe: sessions again Pin
doWhileSomething19-Jul-07 12:44
doWhileSomething19-Jul-07 12:44 
GeneralRe: sessions again Pin
boyindie20-Jul-07 0:29
boyindie20-Jul-07 0:29 
AnswerRe: sessions again Pin
Deepak Gedia19-Jul-07 20:42
Deepak Gedia19-Jul-07 20:42 
GeneralRe: sessions again Pin
boyindie20-Jul-07 0:56
boyindie20-Jul-07 0:56 
Questioncopy stored procedures using visual studio 2005 Pin
TheEagle19-Jul-07 5:31
TheEagle19-Jul-07 5:31 
AnswerRe: copy stored procedures using visual studio 2005 Pin
doWhileSomething19-Jul-07 8:23
doWhileSomething19-Jul-07 8:23 
GeneralRe: copy stored procedures using visual studio 2005 Pin
TheEagle19-Jul-07 9:22
TheEagle19-Jul-07 9:22 
GeneralRe: copy stored procedures using visual studio 2005 Pin
doWhileSomething19-Jul-07 10:17
doWhileSomething19-Jul-07 10:17 
GeneralRe: copy stored procedures using visual studio 2005 Pin
TheEagle19-Jul-07 11:06
TheEagle19-Jul-07 11:06 
GeneralRe: copy stored procedures using visual studio 2005 Pin
doWhileSomething19-Jul-07 12:35
doWhileSomething19-Jul-07 12:35 
GeneralRe: copy stored procedures using visual studio 2005 Pin
TheEagle19-Jul-07 18:19
TheEagle19-Jul-07 18:19 
QuestionProblem passing data to javascript Pin
TAK7819-Jul-07 4:49
TAK7819-Jul-07 4:49 
AnswerRe: Problem passing data to javascript Pin
Eduard Keilholz19-Jul-07 5:13
Eduard Keilholz19-Jul-07 5:13 
AnswerRe: Problem passing data to javascript Pin
Guffa19-Jul-07 5:52
Guffa19-Jul-07 5:52 
GeneralRe: Problem passing data to javascript Pin
TAK7819-Jul-07 6:07
TAK7819-Jul-07 6:07 
GeneralRe: Problem passing data to javascript Pin
Eduard Keilholz19-Jul-07 6:26
Eduard Keilholz19-Jul-07 6:26 
GeneralRe: Problem passing data to javascript Pin
Vasudevan Deepak Kumar19-Jul-07 7:17
Vasudevan Deepak Kumar19-Jul-07 7:17 

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.