[Resolvido] Mostrar Valor Da Variavel
galera no codigo abaixo estou kerendo mostrar na pagina o valor q a variavel de session está mostrando... mas keria numa variavel normal
como eu faço isso???
alguem saberia me dizer... como faz isso...???
pagina ASPX (teste.aspx)
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="teste.aspx.vb" Inherits="teste.spaTeste" %>
<%@ Import namespace="teste"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=session("tTitulo")%></title>
</head>
<body>
<form runat="server"><asp:Label ID="txt" runat="server"/>
</form>
</body>
</html>
script vb (teste.aspx.vb)
Imports System
Imports System.Web
Imports System.Web.UI
namespace teste
public partial class spaTeste
Inherits System.Web.UI.Page
dim aString as String
Sub Page_Load(Src As Object, E As EventArgs)
If Not IsPostBack Then
mostra()
titulo()
End If
End Sub
sub mostra()
dim classe as testeClass = new testeClass()
txt.Text = classe.func_retornaTxt("William")
end sub
sub titulo() 'esse function vem do meu webservice é só retirar ela para funcionar
dim aService1 as new Service1()
session("tTitulo") = aService1.spa_Titulo()
end sub
end class
end namespace
Discussão (3)
Carregando comentários...