473,396 Members | 2,016 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,396 software developers and data experts.

ASP Access Level Question

blyxx86
256 100+
Hey there everyone,
I am running a somewhat complex page (at least to me, because I just happened across IIS one day about a month ago?)...

Anyways, I am having users login to a page, it stores a few values in the session variables. One value is AccessLevel.. this is a range from 0-100, and depending on the value or whatnot, certain parts of the page are displayed or not displayed if they aren't. I'm wondering how much I am taxing the server with all these...
Expand|Select|Wrap|Line Numbers
  1. <%
  2. IF session("accesslevel") > 10 Then
  3. Response.Write("Hello admin....")
  4. Else
  5. Response.Write("Silly peon...")
  6. End If
  7. %>
  8.  
That's a pseudo example, but you get the point. How many of these is good for a page, or should I be doing this another way? I've had to figure out most of the ASP stuff on my own, so I'm not sure of best/common practices with these topics.

Thanks guys!!!
Dec 12 '07 #1
7 1255
jhardman
3,406 Expert 2GB
I'm wondering how much I am taxing the server with all these...
Not very much. I might worry if you were storing large pieces of data as session variables, but I once tried a chat room where all the data was stored as session and application-level variables, and it worked just fine.

Jared
Dec 13 '07 #2
blyxx86
256 100+
So, on average let's say I have about 15 of these "IF AccessLevel" per page, is that too much? I'm not running a very large user base or logins, but as it grows I want to be as efficient as possible from the beginning, rather than having to go back later to implement improvements to the design.
Dec 13 '07 #3
Nicodemas
164 Expert 100+
IF you could find a way to set many parameters at the same time in as few If statements as possible, that would save you some processing.

Also, if two variables are being tested, explicitly cast them, i.e. use CInt() or CLng() to ensure the data types expected are being tested against each other. Implicit casting is slower, as I understand.
Dec 14 '07 #4
jhardman
3,406 Expert 2GB
If you are worried specifically about how much server resources it uses when it's in high demand, you could switch to cookies, that keeps the data stored on the user's computer, but has equivalent processing time.

Jared
Dec 14 '07 #5
blyxx86
256 100+
IF you could find a way to set many parameters at the same time in as few If statements as possible, that would save you some processing.

Also, if two variables are being tested, explicitly cast them, i.e. use CInt() or CLng() to ensure the data types expected are being tested against each other. Implicit casting is slower, as I understand.
Yes implicit is slower, I'm wondering if classic ASP has the ability to dimension variables AS decimal/integer/string, etc... I know .aspx has that ability, and I may convert over to the newer format sometime in the future, but for now, I'm still stretching my limbs.

I was worried about using CInt() and other functions like that as I was afraid it would cost more processing time.. Is that not true then?
Dec 14 '07 #6
Nicodemas
164 Expert 100+
You will lose some, but you'll lose less opposed to allowing IIS to figure it out for you.
Dec 14 '07 #7
blyxx86
256 100+
You will lose some, but you'll lose less opposed to allowing IIS to figure it out for you.
That answers it wonderfully, and it makes a great deal of sense as well. :)

Thank you!
Dec 16 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Marco Alting | last post by:
Hi I have a created a cost reporting system which shows a level-breakdown report. There are three levels in the report the lowest level holds the cost items that are entered by the user these...
38
by: Remco Groot Beumer | last post by:
Hello, I'm trying to decide if the following situation would be workable: Generate an MS Access Front End (which will run localy on client computers), which will link to a DBMS (SQL server or...
1
by: Dave | last post by:
Hello NG, Regarding access-declarations and member using-declarations as used to change the access level of an inherited base member... Two things need to be considered when determining an...
6
by: Jon Davis | last post by:
I recently learned how to do an <OBJECT> alternative to <IFRAME> in current browsers using: <object id="extendedhtml" type="text/html" data="otherpage.html" width="250" height="400"></object> ...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
0
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Today we are going to look at Code Access Security. Code access security is a feature of .NET that manages code depending on its trust level. If the CLS trusts the code enough to...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
0
by: accessman2 | last post by:
I have a question. I want to open the MS Access file with user-level Security. I know that if I do NOT setup user-level Security in the MS Access file, and create the table for login in the MS...
20
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an...
15
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I met with a strange issue that derived class function can not access base class's protected member. Do you know why? Here is the error message and code. error C2248:...
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:
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...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.