I'm not sure if someone has requested in the past (I know I've looked for a solution for a while) but I've just developed a very neat way of getting the current page name in ASP:
How can I retrieve the current page url(and parameters/arguments) using ASP code? The current page is an asp search results page so the url includes the page name and the criterion(sorry I don't know what they're called) I had the 'post' method tag on the end.
I need to get it and store it so I have an easy way of getting back to this page at a click of a button a few pages down the track. I've tried using location and history but I'd like to manage it myself.
is there a command in asp to get the name of the current page?
furthermore, is there a way to retrieve the name of the current page within an 'included' file (not the name of the included page, but the name of the page that is including the file)?
I am using an include for a navigation bar, This nav bar appears on many different pages and the help facility a button on the navigation barneeds to launch a help box relating to the page it is included in.
The help files are .html but the file names relate directly to the asp page in which the navbar is included. To get the javascript in the navbar to correctly display the correct help window, I need to get at the page name. I am using
dim thisPage thisPage= request.ServerVariables("URL")
This will hopefully return me the full file path of the page that the navbar is included in. I then need to take the filename out of this URL and remove the .asp from the end so that i can use it in my javascript function to open the corresponding .html help file.
I'm just working on this big newsletterscript, wich will be working with templates (preformatted html code), stored in the database. I've already started but i'm still looking for suggestions or methods to do this more easily then i'm up to right now. So when you you chose another design your content will be loaded in this other template/ html design.
Right now i'm having troubles with the fact that i have a page; nice formatted with the right content! Generated from asp visual output in pure html in my browser. What i want to do now is to get this page structure/ content as it is shown in my browers (html output) INSERTED into MS Access.
I'm trying to add logging to my web application, but I found a strange problem. Whenever I execute a Server.Redirect(Page1.asp) I can use the request.ServerVariables("SCRIPT_NAME") to get the current page name. However, if I use Server.Transfer(Page1.asp), the value of the server variable equals the refering page (In this case default.asp). How do I get the value of the working page regardless of the transfer method.
I would like to know how I can save my current ASP page to the server side in html file format. Then I would like to stream it back to the client side.
I am trying to display the current page that is being view with asp.The line i am tryng to add is "You are editing: CurrentPageName".I can't find any code examples to help with this.
i want to link to another page and include the current page as a querystring in the filename like .ASP Code:
<a href="newpage.asp?previous=currentpage.asp">my link</a> which is a simple matter of explicitly writing it
however, if the script is #include d on every page (so i don't know which page is using it), how can i reference the current page and pass it to my link.
is there an easy way to save the current page in asp through code. for example if I dynamically created a page and then wanted to save it without requiring the user to do anything.
I want to be able to save a file created by an asp file somewhere. Or even email the file if possible. I've searched google extensively and only found people with the same problem but no answer. He solved the problem but didnt post the solution.
Is there an easy way to find out the path of the current asp page? When looking at http://localhost/images/listing.asp I want to be able to extract "http://localhost/"
i have a page and i have mailto tag in it. when i click on that i has to get that page (page containing mailto tag) in the outlook express body . or the URL of the current page in body of the mail.
How would I send an email to someone from a webpage with a link to the current page? I've seen this where you can put in your email, the person's email that you are sending teh page to, a subject for the email, and a message along with the link.
I am developing a simple booking system where I had a booking date. The problem is I want to make sure that the user must book 3 days in advanced for certain room.
I have tried to use DateDiff but it seems doesn't work. Actually i just 1 to make sure that the user must book 3 days in advanced from the current date. I am wondering whether there is anything goes wrong in my datediff function. Code:
I would like to check if a website is currently down, but don't know how to do this efficiently. I do not have access to the remote server. I have tried using XMLHTTP, and it worked, it just took a long time and I felt it wasn't effecient enough. Is there some other way to check if the website is up or not using ASP?
i m looking to set up a 2 pages, one that has a apply button and one that has a checkbox. I want it so if the user clicks on a apply button , it will automatically check a checkbox on the next page.
at the moment if the user clicks apply it just transfers them to page but doesnt check the box, i need it to check the box on the the screen that the user gets transferred to.
I created this logon page that takes a user ID and password and logs in the user. The user Id is the email address of the person loging in.
I also have the reset password option on my page. Here is bug on my page, even if the user's email address doesnt exist in the database as they have not requested access but because they know that the userID is email address they think that because they have email address they should be able to login and when they cant login and get message access denied they try and reset their password which works.
I dont want the reset password option to work if the user has not been provided the access yet.
Here is my login code can anyone tell me how to put a flag to check and see if the user's email address exist. Code:
How to provide remember me check box on login page in asp coding. So that user can be remembered by his local m/c if he wants. Any code support / link in this regard.
iam working on a forum.many users access this forum and post good number of messages. but sometimes i get strange errors like "The system cannot find the file specified. " I suspect this is cuz load factor or may be bad sql statements.
how can i check the asp page activity like whether all the objects are closed are still running? amount of time a perticlar page is taking to execute? under what circunstances does the above error occur?
I want to check a checkbox automatically once a value in input box is changed, both the input box and check box belong to one row of a table.
I used the onChange event in the input tag and called the a Javascript(I am sure I am not doing it right here), but it doesnt change the checkbox status.
Can somebody please give me some examples on how the status of the checkbox can be changed.
I have a noticeboard that the user inputs items into. One of those is the date of an event. Once that event has passed I want it to disappear from the page.
So I need to do a comparison with current date to the date in the "datestarted" field. My table is called "notices." Using Access and ASP VBscript.
Im trying to get the current url where the user is at and store it into a variable. I want this to be done automatically, not when a user clicks a button. Any ideas?
I'd like to know how to display the current URL on the web page as a footer. This seems to be a fairly simple task, but everything i've found on the internet either doesn't work for some reason, or is asp.net specific....
I have an asp page currently such as default.asp?x=1&y=2&z=3
Now I want to keep the existing parameters and attach another parameter to it and resend to default.asp
As the original parameters are dynamic, and may or may not be generated, the only way is to read the current url and to simply add my new parameter such as h=5 to the url.
I don't know how to read the current url.
I tried Request.ServerVariables("SCRIPT_NAME") but that didn't include the parameters. i.e. it just returned the default.asp