asp-classic

Difference between asp and asp.net

What is the difference between asp and asp.net? ...

Getting the size of a remote folder via classic ASP

I'm trying to something pretty simple but am having headaches with it. I'm pretty sure all I have here is a permissions issue I don't know how to solve but I could be wrong. Here is my scenario... I have 3 servers... Server A - Web Server (Windows 2003) - Anonymous Access Enabled Server B - Red 5 Media Server Server C - NAS The webs...

Classic ASP: Calculate the number of weeks by date

I am trying to fix a function which returns the number of weeks in a given year. Here's how it looks: Function GetWeekNo(date) weekOfYear = DatePart("ww", DateValue(date), vbMonday, vbFirstFourDays) If weekOfYear > 52 Then If DatePart("ww", DateValue(date) + 7, vbMonday, vbFirstFourDays) = 2 Then weekOfYear =...

How to mimic ASP Server.URLEncode in ASP.NET?

In ASP: Server.URLEncode("+&(). -*<>/\|") ' returns %2B%26%28%29%2E+%2D%2A%3C%3E%2F%5C%7C In ASP.NET Uri.EscapeDataString("+&(). -*<>/\|") // returns %2B%26().%20-*%3C%3E%2F%5C%7C HttpUtility.UrlEncode("+&(). -*<>/\|") // returns %2b%26().+-*%3c%3e%2f%5c%7c Is there any elegant way how to mimic old ASP behavior in ASP.NET? ...

Why the asp code fail?

HeaderStr = HeaderStr & "<link href="""&HB_ManageFolder&"/Include/ASBox/ASBox.css"" rel=""stylesheet"" type=""text/css"">"&vbcrlf But if I change &HB_ManageFolder& to & HB_ManageFolder & it will work. Why? ...

How to return a classic asp page with a different name than the asp page on the server

Is it possible to return to the web client a page named differently than the original classic asp page read from the web servers folder ? F.i. a real example I would like to implement: let's say I have an classic asp called calendar.asp If this page is called today (Jan 6, 2010) the page returned to the client web site should be: c...

Compiling Microsoft's LoginAdmin.dll code without Visual Studio

I'm trying to use some impersonation functions in a classic ASP page. I found a MS KB article at http://support.microsoft.com/kb/248187 which explains how to do this, but it requires compiling a DLL. Unfortunately, they expect the developer to have Visual Studio, which I do not have access to (nor do I want to). Could anyone tell me how ...

Sending a 'application/soap+xml' SOAP request using Classic ASP

Any help with this would be appreciated; I've been at it for a few days now. Below is the code that I've got so far; unfortunatly when I run it I get a HTTP 415 error; Cannot process the message because the content type 'text/xml; charset=UTF-8' was not the expected type 'application/soap+xml; charset=utf-8'. I have to send the content...

ADO.RecordCount equals - 1 problem

When ever I try to access the RecordCount property, I always get a return value of -1. Below is my sample code. Set oConn = Server.CreateObject ("ADODB.Connection") oConn.Open Application("strConnectstring") Set rs = Server.CreateObject ("ADODB.Recordset") rs.ActiveConnection = oConn SQL = "Publications_PicoSearchListing" set rs = oConn...

Populate Dropdown from SQL in Classic ASP

I am trying to force users to only select certain values when adding a record. So naturally I am using a dropdown, but I'd like the options to be populated by a specific field in the database. I figured I'd do a Do/Loop but I am apparently doing something wrong. Dim dstrSQL Dim drs dstrSQL = "SELECT EventID FROM Events" set co...

Change script execute permissions of a directory in IIS6 dynamically thru ASP.

This is kind of an advanced problem, hopefully one of you asp/VB gurus will have a suggestion. I am trying to dynamically set a folder's execute permissions in IIS6 from an asp page. I have given the server full permissions to make the changes necessary. When I run the code I get: Microsoft VBScript runtime error '800a0046' Permission ...

Do I need AJAX and ASP.NET for what I'm doing?

Hi folks. Easy question. I used to develop websites back in the days of "classic" ASP, and when I'm asked to do a quick and dirty website for family or friends now, I still resort to direct HTML/ASP and some basic CSS and Javascript - I can get the sites up pretty quickly this way. However, I've had a few requests to design and develo...

Overloaded function in classic asp JScript

Is it possible to have an overloaded function in classic asp JScript ...

Type mismatch: '[string: ""]'

I receive the following error when there is no value for querystring. (I mean like index.asp?ID=). Microsoft VBScript runtime error '800a000d' Type mismatch: '[string: ""]' index.asp, line 10 I tried converting NULL value to something else with the following code. It did not work. MEMBERID = Request.QueryString("ID") If ME...

Prevent SQL injection on free response text fields in classic ASP

I've got some free-response text fields and I'm not sure how to scrub them to prevent SQL injection. Any ideas? ...

How to edit the ASP.NET HTML Body variable?

body = "<HTML>" & _ "<HEAD></HEAD>" & _ "<BODY>" & _ " <Font Face=Arial Size=5><B>" & _ " This is a test Email" & cEmail & _ " </B></Font><BR>" & _ " <H3><A Href=http://www.website.com&gt;Click here</a>" & _ " to go to website.com</h3>" & _ "</BODY>" & _ "</HTML>" this a ASP variable with html text it works well i just want t...

classic asp syntax highliting inside javascript in Visual web developer ee 2008

How can visual web developer Express Edition highlight the classic asp-Tags (<% asp code %>) insight the Javascript code? If i write <script> alert("<% =session("user_name %> "); </script> VWD highlights this as a string and not as asp-code. This is total confusing in these old files i'm working with. ...

creating an .NET COM component

I need to create a class that can be accessible through the classic asp's Server.CreateObject method, and that exposes 3 properties (int Width, int Height, bool Loaded) and 3 methods (void Load(string locatoin), void Resize(int width, int height), void Save(string location)). All my attempts so far has been unsuccessful. Any help would ...

select a different element other than the one clicked

How do I select an element with jquery, when a different element is clicked, when you don't know the name of the element? The code below is looping over the all the categories. I don't know how many categories there are, or what the names will be. When the 'insertUrl' link is clicked, I need to select the text area. The only thing I ca...

How to use debug points in notepad++?

I just downloaded Notepad++ because I need to work on a classic asp project. I'm a complete beginner with classic asp, and have been spoiled with asp.net and visual studio. I noticed Notepad++ has debug points you can place beside the line numbers. Is there a way I can step through asp script code using those? If not what is the best / ...