|
-
Jul 15th, 2003, 03:46 PM
#1
how can I access Server, or Request in another class?
I made a private class in one of my asp pages. I tried to access the Server and the Request object but it doesnt let me... How can I access it inside a class?
also, can I put some functions in global.asax and access those functions anywhere? ( I mean can I use the global file just like a public module?)
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 15th, 2003, 03:56 PM
#2
PowerPoster
You can't access them. What I have done though, is use those obects to pass in arguments so you have access to the data you need.
-
Jul 15th, 2003, 04:11 PM
#3
aha ook I'll do that, heh
how about the globals file? can it be used like a global module? if I add a public function to it, can I access it from every page? it doesnt LOOK LIKE I can
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 15th, 2003, 04:37 PM
#4
PowerPoster
I don't think you can, but why would you want to anyway? If it is, I don't know a way.
You can just create a normal module if your using VB and access it. It would be best this way anyway, because the global module file is for application events, not your custom functions.
-
Jul 15th, 2003, 08:08 PM
#5
Hyperactive Member
Originally posted by hellswraith
You can't access them. What I have done though, is use those obects to pass in arguments so you have access to the data you need.
You can access them thru the HttpContext Class.
For functionality that is common to all pages what I do is create a base class that inherits from Page and contains the common methods. Then all pages inherit my base class and the common functionality.
-
Jul 15th, 2003, 10:11 PM
#6
Originally posted by pvb
You can access them thru the HttpContext Class.
For functionality that is common to all pages what I do is create a base class that inherits from Page and contains the common methods. Then all pages inherit my base class and the common functionality.
aha, good idea and thanks for the link....
hellswraith thanks I think I'll make a module
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
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
|