hola, hay alguna forma de meter todo este codigo en una .dll? y usarlo desde cualquiera de mis paginas en la intranet con tan solo llamar las funciones? o es explicitamente necesario hacer clases para meter en dll?
la verdad no tengo ni idea de como hacer clases entonces no se todavia como hacer dlls. estoy en el proceso de aprendizaje de las dichas clases..
espero me den una mano con esta duda.
Código:
<%
function cabecera()
'#####################################
'PARA NO ALMACENAR EN CACHE
'#####################################
response.expires = 0
response.expiresabsolute = Now() - 1
response.addHeader "pragma","no-cache"
Response.Buffer = true
response.addHeader "cache-control","private"
Response.CacheControl = "no-cache"
'#####################################
'ESCRIBE LA CABECERA DE LA PAGINA
'#####################################
response.write "<html><head><title>mi titulo aqui</title><meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">"
'#####################################
'CAMBIA LA APARIENCIA DEL SOFTWARE SEGUN LAS PREFERENCIAS
'DEL USUARIO (COLOR,LETRA,TAMAÑO,ETC.)
'#####################################
'response.write "<link href=""../estilos/"& response.cookies("apariencia")&""" rel=""STYLESHEET"" type=""text/css"">
'#####################################
'ICONO DE FAVORITOS
'#####################################
response.write "<link rel=""shortcut icon"" href=""../img/icono.ico"">"
'#####################################
'CIERRA ETIQUETA HEAD DE HTML
'#####################################
response.write "</head>"
end function
function cuerpo()
'#####################################
'ESCRIBE EL CUERPO DE LA PAGINA
'#####################################
response.write "<body style=""border:0xp"">"
end function
function final()
'#####################################
'ESCRIBE EL FINAL DEL CUERPO Y DEL HTML DE LA PAGINA
'#####################################
response.write "</body></html>"
end function
Dim rs
function conx_bd(nombre_bd)
'#####################################
'CONEXION A BASE DE DATOS DE TODOS LOS MODULOS
'DE MANERA GENERAL.
'EL PARAMETRO nombre_bd CORRESPONDE AL NOMBRE DE LA
' BASE DE DATOS QUE SE DESEE ABRIR
'#####################################
con = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source="& Server.MapPath("../carpeta/"&nombre_bd&".mdb")&";" & _
"Jet OLEDB:Database Password=miclave;"
set conx = Server.Createobject("adodb.connection")
conx.open con
conx_bd = conx
end function
'#####################################
' FUNCION PARA CERRAR CONEXION Y DESTRUIR
' LOS OBJETOS
'#####################################
function cerrar_con()
conx.close
rs.close
set conx = nothing
set con = nothing
set rs = nothing
End function
%>