|
-
Nov 18th, 2004, 06:21 AM
#1
Thread Starter
Fanatic Member
variable in the whole aspx page?
hello all,
this must be pretty simple though i cannot find a way to do this.
basically, i want to define a variable that can then be used by the Subs and functions of the aspx page. not using a session variable, how can i do that?
for instance, i get the variable
VB Code:
Dim EditorHeight As Long
If Request.QueryString("type") = "full" Then
EditorHeight = 480
End If
and would like to use it on all subs. right now, i put this code in the Page_Load sub but when used in the other subs i get a 'variable not declared' error...
thank you,
wc.
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
-
Nov 18th, 2004, 06:42 AM
#2
-
Nov 18th, 2004, 08:07 AM
#3
Retired VBF Adm1nistrator
Specifically at the top just inside your class
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Nov 19th, 2004, 04:09 AM
#4
Thread Starter
Fanatic Member
hi,
thank you for your response! 
if i do put this at the top, before the Page_Load sub, i get an error stating that 'declaration expected' (though i do declare the variable).
any ideas?
When your car breaks down,
close all windows and retry 
=> please rate all users posts! <=
-
Nov 19th, 2004, 06:54 AM
#5
Retired VBF Adm1nistrator
Can you post the code from the top of your code behind?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Nov 19th, 2004, 06:55 AM
#6
Originally posted by wildcat_2000
hi,
thank you for your response! 
if i do put this at the top, before the Page_Load sub, i get an error stating that 'declaration expected' (though i do declare the variable).
any ideas?
What if you put it elsewhere, like outside the sub?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|