473,385 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to pass a variable from test.aspx.vb to test.aspx?

Hi,

I use code-behind, but how can i pass a variable from test.aspx.vb to
test.aspx?

Test.aspx.vb contains this:
Partial Class test
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

dim lol as string
lol="Carl"
.....
In test.aspx, i want to have: hello Carl
So i did:
<form id="form1" runat="server">
<asp:Label Runat="server">Hello <%=lol%></asp:Label>
But i get the error: "Name 'lol' is not declared"

Thanks
Chris
May 11 '06 #1
1 2594
I found it.
Put it out of the sub and with the key 'public'
"Chris" <cc*@sdsd.dc> wrote in message
news:Ol**************@TK2MSFTNGP05.phx.gbl...
Hi,

I use code-behind, but how can i pass a variable from test.aspx.vb to
test.aspx?

Test.aspx.vb contains this:
Partial Class test
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

dim lol as string
lol="Carl"
....
In test.aspx, i want to have: hello Carl
So i did:
<form id="form1" runat="server">
<asp:Label Runat="server">Hello <%=lol%></asp:Label>
But i get the error: "Name 'lol' is not declared"

Thanks
Chris

May 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mike Ratliff | last post by:
I need to call internet explorer from another program and pass along a variable to the aspx page that I am opening. example iexplorer.exe "search.aspx?variable1="12345" please give me an example...
3
by: Hermit Dave | last post by:
Hi, Trying to pass a value to user control within a page. 1. Couldnt find a way to pass it from code behind file. 2. Trying to pass it from aspx page... using EditURL='<% "mypage.aspx?myvar=" +...
2
by: Joe Molloy | last post by:
Hi, This isn't a mission critical question but I thought I'dl throw it out there for your feedback as it's a bit curious. I have developed a shopping cart for an application I'm working on...
8
by: darrel | last post by:
I'm still trying to fully understand how best to pass variables between pages/usercontrols/each other. On a current site I've done, I've had one userControl do the logic and set the variable,...
12
by: Phil Certain | last post by:
Hi, I'm trying to do something very simple...or at least it should be. I have created a host page (gen.aspx) and a very simple user control (us.ascx). The corresponding code-behind files are...
4
by: Phillip Vong | last post by:
I'm a newbie using VS2005 to learn and test. I'm testing against the Northwind DB. I created a simple variable called "myVariable" and I assigned it the character "c". I want my SQL query to use...
1
by: drec | last post by:
I need to pass a variable from script1.php to script2.php. The problem is that these scripts use frames and therefore I am able to pass the variable through the URL. It also does not use forms to...
10
by: tshad | last post by:
I want to access multiple arguments based on name passed. For example I have the following asp:textboxes: BillingAddress1 BillingAddress2 BillingCity ShippingAddress1 ShippingAddress2...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.