|
-
Nov 11th, 2004, 10:58 AM
#1
Thread Starter
Lively Member
How to configure the global.asax.vb file?
Hi,
I want to create a class to store data in it along the user session variable. To do so I was advised to create the class in the global.asax.vb file, but I don’ t know how to do it. I don’ t have that file, and I don’ t use any development tool such as VS.NET, Web Matrix, etc.. I program all my site typing the code in Dreamweaver MX.
I tried to create the global.asax.vb file simply opening a new Dreamweaver blank document, and saving it as ‘global.asax.vb’. Then I typed into that file:
Code:
' VB Document
<script language="VB" runat="server">
Public Class User_info
Public email As string
Public offer_id As Int64
End Class
</script>
Then, in the page that starts the session I typed:
Code:
<%@ Page Language="VB" Debug="true" %>
<script language="VB" runat="server">
Sub check_User(Sender As Object, E As ImageClickEventArgs)
‘ Code to check into the DB for correct e-mail and password
strConnection.open()
CmdDataBaseResponse.ExecuteNonQuery
strConnection.close()
Dim User_num As Int64 = CmdDataBaseResponse.Parameters("@Id").Value
Dim UserSessionInfo As New User_info()
UserSessionInfo.email = CmdDataBaseResponse.Parameters("@e_mail").Value
Session("Private_Session") = UserSessionInfo
Response.Redirect(“private_area.aspx ?" + "UserId = " + Server.UrlEncode(User_num))
End Sub
</script>
<html>
<head>Authentication Page</head>
<body>
</body>
</html>
But when I load that Authentication Page I receive this error:
Type 'User_info' is not defined.
Line 732: Dim UserSessionInfo As New User_info()
What is wrong? Is it well defined my global.asax.vb file? Or is it better to use VS.NET or a similar tool to configure that file?
Thank you,
Cesar
-
Nov 12th, 2004, 06:35 AM
#2
Retired VBF Adm1nistrator
Just use VS.NET
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Nov 17th, 2004, 02:34 PM
#3
Hyperactive Member
global.asax.vb??
I've always used global.asax
I didn't know global.asax.vb exists as a special file, does it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|