Boa tarde amigos,
Gostaria de uma informação, o item INCLUDE, pode conter variáveis ASP ?
include="teste.asp?aa=teste"
Gostaria de chamar um arquivo a partir de outro porém enviando uma informação à esse que seria chamado.,
Agradeço
Augusto Flávio

Include
Started By Augusto Flávio, 15/09/2009, 14:40
5 replies to this topic
#1
Posted 15/09/2009, 14:40
#2
Posted 16/09/2009, 09:29
Boa pergunta, eu ainda não tive essa necessidade de usar um include com variavel
mas vou testar!
mas vou testar!
====================================================
Diego M.
Html, CSS, Javascript, Asp, Asp.net, Php, Sql Server, Mysql, Oracle, VB.NET, VBA
====================================================
Diego M.
Html, CSS, Javascript, Asp, Asp.net, Php, Sql Server, Mysql, Oracle, VB.NET, VBA
====================================================
#3
Posted 16/09/2009, 11:22
Obrigado pela atenção.
Se puder me ajudar ficarei muito agradecido
Augusto Flávio
Se puder me ajudar ficarei muito agradecido
Augusto Flávio
#4
Posted 17/09/2009, 10:39
Isso existe.
NO PHP
Parâmetros não fazem diferença.
<?php include 'teste.asp?acao=1'; ?>
Mas isso não existe.
ASP e PHP juntos não funfa
<?php include 'teste.asp?acao=<%=Variavel%>'; ?>
NO ASP
Existe
<!--#include-file="teste.php?acao=1"-->
Nao existe
<!--#include-file="teste.php?acao=<?=$variavel?>"-->
NO PHP
Parâmetros não fazem diferença.
<?php include 'teste.asp?acao=1'; ?>
Mas isso não existe.
ASP e PHP juntos não funfa
<?php include 'teste.asp?acao=<%=Variavel%>'; ?>
NO ASP
Existe
<!--#include-file="teste.php?acao=1"-->
Nao existe
<!--#include-file="teste.php?acao=<?=$variavel?>"-->
Edição feita por: DeeK, 17/09/2009, 10:41.
#5
Posted 17/09/2009, 11:54
A solução é assim
pagina index.asp
[CODEBOX]
<% option explicit %>
<%
Dim str_include
str_include = "?teste=sdfhslfkshflkfhsflk"
%>
<!-- #include file= "teste.asp"-->
<%
Response.Write f_valor(str_include)
%>
[/CODEBOX]
teste.asp
[CODEBOX]
<%
function f_valor(recebe)
f_valor = recebe
end function
%>
[/CODEBOX]
não achei nada sobre include com variavel no asp! mas tem como você criar funções e chamalas na pagina depois de incluir a pagina!
pagina index.asp
[CODEBOX]
<% option explicit %>
<%
Dim str_include
str_include = "?teste=sdfhslfkshflkfhsflk"
%>
<!-- #include file= "teste.asp"-->
<%
Response.Write f_valor(str_include)
%>
[/CODEBOX]
teste.asp
[CODEBOX]
<%
function f_valor(recebe)
f_valor = recebe
end function
%>
[/CODEBOX]
não achei nada sobre include com variavel no asp! mas tem como você criar funções e chamalas na pagina depois de incluir a pagina!
Edição feita por: DiegoCoruja, 17/09/2009, 11:58.
====================================================
Diego M.
Html, CSS, Javascript, Asp, Asp.net, Php, Sql Server, Mysql, Oracle, VB.NET, VBA
====================================================
Diego M.
Html, CSS, Javascript, Asp, Asp.net, Php, Sql Server, Mysql, Oracle, VB.NET, VBA
====================================================
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)