asp-classic

Unicode Hello World Page

走远了吗. 提交于 2019-12-06 16:25:43
问题 Can someone show me a simple ASP script that produces a unicoded webpage? Maybe you could write Hello world in a variety of languages. Also how can I convert floats to string so that I can produce "2.3" or "2,3" depending on the country the page is being directed to. Does ASP offer functionality for doing this? Furthermore, how do you convert "A B" to "A B" etc. Thanks, Barry 回答1: Unicode: There are two parts in creating a true Unicode (utf-8) page. First you will need to output the data as

Accessing COM Component from Classic ASP which consumes WCF throwing error

末鹿安然 提交于 2019-12-06 16:11:00
问题 I created a COM interop component using ClassLibrary which consumes WCF. Now when I call COM component's Method (which uses WCF) from my Classic ASP page, I'm getting the following error. Error Type: System.ServiceModel (0x80131509) Could not find default endpoint element that references contract 'DLSWS.IDLSWS' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract

Old Classic ASP pages getting caught in MVC Route

允我心安 提交于 2019-12-06 15:56:45
I am converting an existing classic ASP website to (VB) MVC and I don't want any of the existing URLs to break. I have read many posts (like this one: Routing Classic ASP Requests To .NET - SEO Redirects ) about how to do the proper 301 redirect. With the latest MVC release, I've gathered that Response.RedirectPermanent(objRedirect.new_url, True) is all that is needed. I have entered all of my old URLs in a database table with a corresponding column of the new URL. I have added code in my custom 404 page to get the original URL: Dim strURL As String = Request.RawUrl.Substring(Request.RawUrl

How to do effective paging in Classic ASP?

烂漫一生 提交于 2019-12-06 15:53:58
问题 I'm trying to page a table, and while I have paging already working, it displays every page in a single line along with Previous/Next links, causing the HTML page to break if there are a lot of results (which often there are). What I'd like to do is display the pages in batches of 10, e.g. 1...10, if you're on page 10 and click "Next" then it changes to 11-20, and so on. How should I go about doing this? 回答1: Wayne I would recommend you have a look at ajaxed asp library . It is a still active

How to convert VB script array to JavaScript array classic asp

蓝咒 提交于 2019-12-06 15:26:56
Classic asp: sub a aryaa(0,0)=1 aryaa(0,1)=2 end how to call this array in script function, and how to make this vbscript array to javascript array. Please help me out from this, since 3 days i m searching for this. Thanks. jain ruchi Suppose MY VBScript array is aryATTPlans than the below code describe ( VBScript array to Javascript array) // this is client JS code var aryATTPlans = new Array(); var aryATTPlans = new Array(2); var i, j; <% ' this is server VBS code If IsArray(aryATTPlans) Then j=0 For i = 0 to ubound(aryATTPlans) %> aryATTPlans[<%= i %>] = new Array(2); aryATTPlans[<%= i %>][

asp classic how to trap errors when connecting to an oracle linked server

瘦欲@ 提交于 2019-12-06 15:02:06
I have a query in classic ASP like this: sql_test="select * from Openquery(it_test, 'select * from IT_DB.HOST') the problem is that I want to test the connection to the linked server before executing it and getting an error on the page. If the connection to the linked server doesn't work (ex: db down) I can execute a query on the local SQL server 2000 db avoiding getting an error on the page. I tend to use this code... 'GetDataSet error columns... const C_ERROR = "ERROR" 'Used when an error is generated - to be fed to the comsuming routine const C_NO_DATA = "NO_DATA" 'Used when no data is

Specifying decimal places on a variable in a string

心已入冬 提交于 2019-12-06 13:57:58
after briefly looking for a few hours I see multiple solutions to my problem but I am struggling to implement them and hopefully someone can help a noob. The issue is that I have a drop down box in an ASP/MySQL web application that displays a few prices incorrectly. e.g if the data is 32.00 the figure displayed will be returned as 32, similarly if it 6.50 it displays as 6.5 The data type or the price is set to Decimal(19,2) length in the db table, and the price shows correctly elsewhere except in this one instance of options displayed in a drop down box. I am pretty certain there is an easy

Classic ASP and Signature Pad

梦想与她 提交于 2019-12-06 13:18:49
问题 I'm trying to get a Classic ASP version of this app to save images to my server: https://github.com/szimek/signature_pad I've tried various combinations of using the Base64 output but have not had any success. I've searched this site and Googled but haven't been able to find anything that makes sense to me. If anyone has any ideas on how to convert the output from Signature Pad to a server side image I would be very grateful! The JS code is: var wrapper = document.getElementById("signature

Making a HTTP request to API possible with VB/ASP classic?

a 夏天 提交于 2019-12-06 13:13:47
Is it possible to make requests to a Web API with ASP classic? For example just something as simple as the Flickr API, or was this sort of thing not supported way back when? It's quite possible: Dim req Set req = Server.CreateObject("MSXML2.ServerXMLHTTP") req.open "GET", "http://blabla.com", False req.send() Response.Write(req.responseText) You should be able to find examples of how to parse XML and JSON here on stackoverflow.com 来源: https://stackoverflow.com/questions/2883444/making-a-http-request-to-api-possible-with-vb-asp-classic

How to use Geocoding API v3 in Classic ASP

孤街浪徒 提交于 2019-12-06 12:29:33
wondering if anyone could help me. I'm trying to return the results of lat and lng of an address. New to coding and have got stuck. The following code worked fine until the Geocoding went from v2 to v3. Can you tell me where I'm going wrong? and do I need a new v3 key or key at all? Thanks in advance. <% Function GetXML(url) Dim xmlobj Set xmlobj = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") xmlobj.setTimeouts 30000, 30000, 30000, 30000 xmlobj.Open "GET", url, False xmlobj.send() If xmlobj.status = 200 Then GetXML = xmlobj.responseXML.xml Else Response.Write "The geocoding server could not