how to pass a variable from one file to another?

C

Chris

Hi,

The first file contains (test1.aspx):
<%@ Page Language="VB" %>
<script runat="server">
Public myvr As String
</script>
<%myvr = "ok"%>

The second file (test2.aspx):
<%@ Page Language="VB" %>
<% Response.Write(myvr)%>

When i run test2.aspx, i get:
"Name 'myvr' is not declared"

How to declare it?
Thanks
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,301
Latest member
BuyPureganics

Latest Threads

Top