![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have the following at the top of my page ------------------------------------------------------------ script runat = "server" Function Login_Action(ByVal UserName As String, ByVal Password As String) As Boolean ' Insert code that implements a site-specific custom ' authentication method here. ' ' This example implementation always returns false. Return False End Function Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) e.Authenticated = Login_Action(Login1.UserName, Login1.Password) End Sub /script ------------------------------------- This works as expected. What I would like to do is something like: ------------------------------------- script runat = "server" #include "lgnfile.vbs" Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) e.Authenticated = Login_Action(Login1.UserName, Login1.Password) End Sub /script --------------------------------- And put the Login_Action funtion into the included file. Any ideas if this is possible? How to do it? Every method I have tried fails. Thanks -- bnhcomputing |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
OK, I must be stupid. I looked at those to methods, and they went in one ear, and out the other. I was hoping there was some simple solution where I could just do an #include statement like in ASP. That way, if my client finds a bug in the site(s), I change the include file, they refresh, error fixed. I know I can build DLL(s), but I really want to avoid that, because then I'd have to shut the entire site down to do a repair. When I use the old ASP way, I can specify includes at the top of the page code as server script and then access those functions. Both of the methods suggested are client side, not server side like the old ASP. Did we loose functionality with .net (ASPX) ? -- bnhcomputing |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |