monkeynote Posted January 13, 2008 Posted January 13, 2008 hello guys! :) i would like to ask if it is possible to put an object in session (global.asax) im trying to migrate my classic asp code into VB.net and i successfully referenced my DCOM. in my global.asa i only put this code to be accessible to all pages <object runat="server" progid="pass" id="objectname" scope="session" > </object> and here is my classic asp code 'Log In.asp if not isempty(request.form("buttLogIn")) then username = request.form("tbxUsername") password = request.form("tbxPassword") stat = objectname.chkUserID(username, password) if stat = "00" then response.write("Succesfully Logged In") else response.write("* Invalid Username / Password") end if end if and here is my current ASP.net code together with my question remarks Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim username As String, password As String Dim stat As String 'how to put this object in the global.asax? Dim epass As epasssoa.epasssoa = New epasssoa.epasssoa If Request.Form("buttSubmit") <> "" Then username = Request.Form("boxUsername") password = Request.Form("boxPassword") If username <> "" And password <> "" Then stat = epass.chkUserID(username, password) If stat = "00" Then Response.Write("Succesfully Logged In") Else Response.Write("* Invalid Username / Password") End If End If End If End Sub how can i put this object (epasssoa.epasssoa) into my global.asax? i tried to put it in the global.asax but i cannot access this object :( i hope that you can help me with my problem. Quote
Administrators PlausiblyDamp Posted January 16, 2008 Administrators Posted January 16, 2008 Global.asax and session aren't really the same thing, if you wish to access the variable anywhere then you could just declare it as a shared variable. If you are wanting to put it into the session then click here for some info from the msdn. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.