473,395 Members | 1,457 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,395 software developers and data experts.

public variable

why is this not working:

###### code #######
Public userlogin as String

Sub Page_Load(Sender as Object, e as EventArgs)
userlogin = request.form("userlogin")
response.write(userlogin) 'THIS WORKS !
End sub

Sub btn_step4_Click (sender As Object, e As System.EventArgs)

response.write(userlogin) 'BUT THIS DOES NOT

End Sub
###### code end #######

THX !
Nov 19 '05 #1
2 925
Hi, Nicholas!

Does it throw an exception? Do btn_step4 post the same form (or one
including a key named userlogin) that you use when the Page_Load code works?

Lars-Erik

"nicholas" <mu********@hotmail.com> wrote in message
news:uW**************@tk2msftngp13.phx.gbl...
why is this not working:

###### code #######
Public userlogin as String

Sub Page_Load(Sender as Object, e as EventArgs)
userlogin = request.form("userlogin")
response.write(userlogin) 'THIS WORKS !
End sub

Sub btn_step4_Click (sender As Object, e As System.EventArgs)

response.write(userlogin) 'BUT THIS DOES NOT

End Sub
###### code end #######

THX !

Nov 19 '05 #2
found it.
I came from the previous page with server.transfer("...")
So, when I clicked on the button it went to the real page and than, that
request.form was empty.
So, the problem was not the way I use "public", but the way I transfered
variables.

THX anyway

"Lars-Erik Aabech" <la******@newsgroup.nospam> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi, Nicholas!

Does it throw an exception? Do btn_step4 post the same form (or one
including a key named userlogin) that you use when the Page_Load code works?
Lars-Erik

"nicholas" <mu********@hotmail.com> wrote in message
news:uW**************@tk2msftngp13.phx.gbl...
why is this not working:

###### code #######
Public userlogin as String

Sub Page_Load(Sender as Object, e as EventArgs)
userlogin = request.form("userlogin")
response.write(userlogin) 'THIS WORKS !
End sub

Sub btn_step4_Click (sender As Object, e As System.EventArgs)

response.write(userlogin) 'BUT THIS DOES NOT

End Sub
###### code end #######

THX !


Nov 19 '05 #3

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

Similar topics

9
by: Banaticus Bart | last post by:
I wrote an abstract base class from which I've derived a few other classes. I'd like to create a base class array where each element is an instance of a derived object. I can create a base class...
10
by: Zap | last post by:
Widespread opinion is that public data members are evil, because if you have to change the way the data is stored in your class you have to break the code accessing it, etc. After reading this...
2
by: THY | last post by:
Hi, I am having some problem, I declare few variable in a public module and use them in the web application. But after that I found that the variable declared in public variable =...
10
by: darrel | last post by:
I'm still trying to sort out in my head the differences between public and shared when referring to declaring properties or variables. This is my understanding: shared - akin to a 'global'...
3
by: Tor Inge Rislaa | last post by:
How to use a public variable In VB.6.0 I could in the declaration part of a form declare a public variable, then assign a value to the variable, open a new form and address the variable and read...
5
by: Neil Steventon | last post by:
Hi, I am new to VB.net , well the objects concept anyway and was wondering if there were any good articles / turorials on when and why you would use certain declarations such as Private test...
9
by: Stefan De Schepper | last post by:
Should I use: Private m_Name As String Public Property Name() As String Get Return m_Name End Get Set(ByVal Value As String) m_Name = Value
7
by: Steve Mauldin | last post by:
I have a public variable that is declared in a public module. This Variable is stored into a Session variable and used to pass data from page to page. I am seeing on my local development box that...
11
by: dgk | last post by:
If I have a class with a public variable, isn't this the same as a private variable with a property? ie, isn't this: Public Class MyTest Public MyVar as String End Class the same as this: ...
10
by: timber910 | last post by:
OK, I've searched all over and used the help on the VBA editor. Helped a little but I'm not getting close enough to see where I'm going wrong. I need a public variable that I will be able to use...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.