I'm doing some error logging on a page and I want to catch a specific error. The error is when the form is submitted and validated, if the entry already exists in the database, rather than displaying the default ugly error, use a custom one.
I can do this with ColdFusion using the <cfcatch> and <cftry> but is there an equivalent in ASP? I know ASP.NET has the 'catch' and 'try' but that doesn't really help me much. the error code for a duplicated entry is -1605.
We have piece of hardware that can post xml data via post, A clocking in machine to be exact. The data that it posts is raw and without headers so when I use the PHP (on apache) system variable $HTTP_RAW_POST_DATA all I see is the XML and CRLF's. As the server I need to use this on does not have PHP, I need to use ASP.
I have tried using ALL_RAW and ALL_HTTP with IIS and ASP but cannot get any data out. If I create a form and post some data to the same script I get what I would expect (the field name= then the data). Is there any equivalent to the $HTTP_RAW_POST_DATA in ASP or do I have to enable something to get this data out (there is a flag in php.ini to turn this on).
I'm used to working with PHP, but have a project that requires me to use ASP. The project is almost finished, but I have one problem that needs to be rectified. In PHP you can use the NL2BR fundtion to ensure that the line breaks are formatted correctly when viewed on the page.Is there a ASP equivalent? If so, how exactly would it be utilised with a server behaviour like this?Code:
I am unable to create object of ("Lotus.NotesSession") from ASP page.I am getting OutOfMemory error.
If i do same thing from ASP.Net and add <identity tag in web.config file with My Network Logon Id and password it works fine. So i want to know How to implement this impersonation in ASP.
is there an equivalent to PHP's eregi_replace.... i know that there is something called tokens enclosed within "[% %]" tags in ASP but i have never used it before... is there anything that can help me such as articles.... i have found some examples from another site but IIS will not load the page.... it just comes out with an empty page. Although when i upload it, it works fine on the webserver.... is there a way to configure it to work on local intranet..?
Does ASP have an equivalent to file_get_contents from PHP? This function essentially returns the output of a webpage.I am also looking for the Perl equivalent if anyone knows that one.
Is there a piece of forum s/w like vBulletin but that runs on ASP/MS SQL Server rather than PHP/MySQL? Someone has asked me about setting up a forum for a client, and though I've written forum s/w myself and much of the functionality is simple enough to do, on this ocassion a more generic approach will be acceptable and more cost effective.
vBulletin is undoubtedly the forum daddy, but the server is an IIS box running ASP (obviously) and in tandem with a SQL Server and that isn't going to change.
i am doing a webpage for a charity i volunteer at. i am setting up a database of all the funders we have sent to and what not. i am trying to code an asp page so that we can only see each funder by the first letter of its name.
i have made the index page which is just html to go to equivilent asp page. then on the asp page i want to query the database and only display the funders that begin with that letter. i have asp code to connect to the database and read from it all i need is to only look for funders that begin with ..
I have some tracking software I wrote in PHP that simple collects a GET string and enters data into a database. I wrote it this way so to use my tracking software all one has to do is pass a few paramaters in the query string and viola, page tracked.
It was also written this way so multiple platforms (read: ASP) could be supported. I am a noob when it comes to ASP but I did manage to write a little script that collects variables, sets cookies and builds the url to post. However, after trying Server.Execute, Server.Redirect, and even an XML object I have not achieved success. Code:
Is there an ASP equivilant of the VB DoEvents function? I am having problems with an ASP script that copies a set of folders and then renames them. Basically the code is running too quickly and it tries to rename the folder before it has been created.
I think in VB you can use the DoEvents function to make sure it has finished doing one bit of your code before moving on to the next bit. Is there zomething I can do in ASP to resolve this problem?
I need to ba able to update records of my database via a user-input form. I have some scripts that uses the Persits objects, such as PersitsUpload.1, that allows to do that.
But, since I am hosting my programs somether that the server does not have persits objects my program fails. What is the equivalent PersitsUpload.1 objects in ASP which allow upload, edit/delete/create new records from user inout via form? Or is there a better way to do this?
I need help creating an asp upload page that will allow the user to browse a local .txt file and then submit it a SQL database. At the same time I would like SQL to run an equivalent process to BCP and add each line in the .txt file to a table.
In PHP, we have an useful function: array_merge();, not available in ASP. I was wondering, what approach I should use in order to create a similar function, in ASP.
The only way I see it is to use 2 separate arrays, grab their contents and store it temporary into Application server memory, erase the 2 arrays, then put it back into a global Array...
It's a fairly complex process that will also drain a little the server memory... I don't like it. I dont use .NET, so SortedList is out of the game... If you have a function/class made, please let me know.
I'm looking for the ASP equivalent of the PHP file() function. The PHP file(yourURL) returns an array where each element contains a line returned by the URL it called. I only know of Response.Redirect or a straight post/get from a form but that takes the user away from the scripting page. Can ASP 'call' another script page and return it's repsonse as the PHP example I have does??
working on a windows/iis for the first time... is there any equivalent to *nix symbolic links in windows/iis? i'm in a shared account, so i need something like an .htacces or .lnk file...
what i'm looking for is redirect every request to "/my_dir/images" to "/images".
Can anybody tell me what is the equivalent of response.end in Javascript?????For eg,consider the following:
<% if i=1 then . . . else resposne.write("Error Message!") response.end end if %>
I am using a confirmation box in my program.If the users clicks "Cancel" he should be redirected to the page he was last viewing and stop the action.
<script> var cc=confirm("Do you want to update the changes?") if (cc==false) then { window.history.go(-1) here i wud want the response to end } </script>
Usually i use this for integers but before i can use the variable i have to use Cint to get the actual value to use in a database. Is there an equivalent fucntion to Cint that returns the string value?
I am trying to find a function in ASP that is the equivalent to PHP's is_dir and is_file. I searched google but had no luck. If no function exists does anyone have another way of determining a folders content and whether or not that content is either a file or folder.
I'd like to do something similar to CFParam, but in ASP - basically, I have a form variable ("Type") which may or may not be passed from the referring page. Some referring pages have an input field called "Type", whilst others do not.
I'm actually a CF developer, but keen to learn ASP. My current code at the top of the script is : Code: