Alternatives
Are there alternaives to using the   tag for spacing out text within the same line?
View RepliesAre there alternaives to using the   tag for spacing out text within the same line?
View RepliesHow do I write " " to the screen? Here's my code:
string(right_array.count, " ")
It keeps printing like this: &
I've even tried this:
server.htmlencode(string(right_array.count, " "))
I just can't get it to work.
I am using ASP to read code from a text file that I am displaying on my
page. Because I do not want the code from the text file to be executed, I
used the Server.HTMLEncode() method to display it as it is in the file.
However, the spaces used to indent lines is still removed by the browser.
I
cannot use VBScript's replace function to replace all spaces with
because that would replace all spaces, including ones that I do not want
replaced as well as majorly increasing the size of my file. Is there any
way to display the spaces used to indent the lines without manually writing
a function to do it?
I've gone through similar threads, but I'm thinking maybe the process of time has reaped a solution. Basically, is there anything besides IIS that will run on windows 2000 desktop.? Pws wont work, webmatrix is for asp.net (not classic asps). So does anyone have a solution? I can't use IIS.
View Replies View RelatedI was wondering if anyone had a good alternative to Session variables.
Background: Basically, I'm coding a personals site for someone, and obviously, there's member and non-member areas. For development, I'm doing the member tracking with a Session variable, but was wondering if there were alternatives for the non-cookie user.
The only other idea I came up with is in my IsLoggedIn function (the one that looks for a Session object and redirects to the login page if it doesn't exist or times out), was to log the user's IP address/timestamp in a DB table, then do a read comparison on their IP address, compare the timestamp to Now() and update the log table with the current time. The problem is, that's one extra search, read, and write for every page the member visits, and I'm concerned about this extra overhead slowing the site down.
I'm also hesitant to create a GUID and pass it in the URL string as these can be faked, plus get messy with respect to pass-through data, etc.
SSL is also out of the question, as the owner doesn't want to buy a certificate, plus this can slow a site down worse than the IP method illustrated above. The site is hosted on Win2K Advanced Server and SQL Server 7 backend.
I have shared hosting at GoDaddy. Every 12 hours they reset IIS in my application pool. This means that anyone logged in when this happens has to log in again. Also, if they submit information after the restart happens they lose all the information.
Are there any alternatives to sessions that won't be affected in case of an IIS reboot? Code:
I'm well aware that you can't use dynamic includes (eg: <!--# include file="path/<%=strPath %>"-->) due to process order in ASP, but I really need to find a work-around.
I can't use TextStream because the files will need to execute.
Server.Execute causes a "Type Mismatch" in the script it executes that functions fine under normal circumstances so I don't know why - though admittedly I'd rather not use this method (it's well documented to be not a very good idea anyway!) so I haven't tried too hard to fix that issue...
All I want to do is say "If a file exists, execute it - if not, do nothing!" Here's my (broken) code - this represents what I would like to achieve though obviously this example will never work because of the required dynamic include. Anyone got any genious ideas to achieve the same results as this script would if it worked? Code:
I am displaying a modal dialog in JScript using window.showModalDialog
passing a long string as URL - i.e. it contains variables values just
like a Get request. Problem is that string is now tool long and
showModalDialog fails. I'm aware of the DialogArguments and passing an
object to receiver but this is no good for me as the receiver needs to
access the long string in server side code and so would not know
anything about the dialogArguments class. Can anyone suggest a way for
me to show the dialog as modal and at same time get the long string into
the dialog and have the string accessable from both server side code and
client side within the dialog recever file ?