asp-classic

Response.Cookies collection seems corrupted and causes error

╄→гoц情女王★ 提交于 2019-12-25 16:42:33
问题 After many hours of debugging some strange error occurring on our classic asp website, I found what could be the cause of the error when reading the Request.Cookies collection. An example of HTTP_COOKIE header received from the client browser is: HTTP_COOKIE:=true; ASPSESSIONIDSQRRDDRS=PAMMOMMAKGDHMAOGLEJPMLIM; X-XAct-ID=e8eb8d86-670c-46ef-ba64-14cc931fd13f; 643af15a72242b4dd892fe8c0c088a39=d60badbf9bebc14f573b4aa7f0474deb; sid=fr33cf49981a883ca433dd333692832ffdd8ee8a; _locale=pt_BR;

how to implement a check box in classic asp

与世无争的帅哥 提交于 2019-12-25 14:00:48
问题 I have a checkbox <td><strong>Online Ordering: </strong></td> <td><input type="checkbox" name="OnlineOrdering" value="<%=OnlineOrdering%>" <% if OnlineOrdering = True then response.write "checked='Checked'" end if %>/></td> How do i capture whether the checkbox is checked or unchecked when form is submitted? OnlineOrdering = request.form("OnlineOrdering") this does not work? 回答1: This should assign a true/false to the variable OnlineOrdering: If Request.ServerVariables("REQUEST_METHOD") =

ASP drop down box to list information from 2 SQL Server columns

时光总嘲笑我的痴心妄想 提交于 2019-12-25 13:35:12
问题 I've got a drop down list of customers. However, some of those customers get listed 2 or 3 times because they have multiple cities. What I would like to do is include the city in the same drop down list next to the city so that each entry is unique <% Dim DataConn Dim custsel Dim SQL Set DataConn = Server.CreateObject("ADODB.Connection") Set custsel = Server.CreateObject("ADODB.Recordset") DataConn.Open "DSN=***;UID=***;PWD=***;" SQL = "select custname, city FROM log.dbo.Customers order by

using classic asp code inside asp.net?

匆匆过客 提交于 2019-12-25 13:17:09
问题 I have a application that running both classic asp and asp net. inside the classic asp page, I have a combo box and depends on the selection of the combo box I need to do something inside my asp.net page. For instance, if inside my classic asp page, I have a combo box and inside the combo box; book is selected than when I enter a price for book as a zero inside my asp.net page I supposed to get an alert. Is there any way to do that? asp.net code if (Convert.ToDecimal(Values["myBookPrice"]) ==

How to build multi language website (English and Arabic)?

…衆ロ難τιáo~ 提交于 2019-12-25 11:52:25
问题 I have a website, its content is in English. I want to access my website in two languages (or more) English and Arabic. In this case, how do I build my website with these two languages? Can anyone give an example for this or any reference? 回答1: Depends on what you want to translate between English and Arabic. Arabic is a semitic language which you write from right to left, while English is written from left to right. This most of the times means that the layout of your application needs to be

Loading screen in classic ASP page

流过昼夜 提交于 2019-12-25 11:09:40
问题 I have a legacy classic ASP page that is taking a long time to load. This is because before loading it must run a large number of database queries. Load time is upwards of 10 seconds. The page structure looks like this: <% SQL Queries %> <html>...Display the data from the queries..</html> ie, all the queries occur before the markup renders. Due to the long load times I want to create a loading screen that will run before the queries start and close when the queries end, to provide an

In classic ASP is it possible to create an END sub or function?

可紊 提交于 2019-12-25 09:34:06
问题 I created a class in asp and wanted to know if it was possible to create a function or sub named "END". Is this possible even as a sub or function. The reason I wanted to call this for my class instance or class module like MyClass.End is to then call response.end? Or is it possible to overide the response.end function to first check something before ending? class Myclass sub write(dim str) response.write(str) end write ' Is this "END" possible? sub end response.end end sub End class 回答1:

fs.DeleteFile(var) not deleting file

夙愿已清 提交于 2019-12-25 08:48:26
问题 On a few of our sites we are running a backup script that saves a MSSQL database as a .bak file in a that directory. Every day we run a Git style backup so that we have any changes to the site. Due to variance in backup timing We don't really want to delete today's backup, or yesterday's, so we will delete 3 days past. The following .asp page runs fine if the DeleteFile(line 30) is commented out. if the file exists it follows the correct branch, so it can see the file, but if the delete line

what wrong on my Function of link to open new window?

亡梦爱人 提交于 2019-12-25 07:05:24
问题 I've tried to create link that can open new window..currently I used Function genLink(req_id) genLink = " onclick=""location.href='order_view.asp?bill_id=" & req_id & "' "" " End function it's work well but just can't make it open link in new window. So i've searched found that it need to be use window.open instead so I do like below.. But it's not work.. Function genLink(req_id) genLink = " onclick=""window.open='order_view.asp?bill_id=" & req_id & "' ,'_blank' "" " End function so could you

SQL with ASP Syntax

让人想犯罪 __ 提交于 2019-12-25 07:02:30
问题 I'm testing out a sql query on a query analyzer and it works just fine, here it is: INSERT INTO Questions(QuestionText, QuestionType) VALUES('test','test') DECLARE @testID int SET @testID = @@identity INSERT INTO Questions(QuestionText) VALUES (@testID) (I'm just testing out the @@identity function) However as soon as I try and implement it on my site (i'm using SQL in conjunction with asp Classic) I get an error, can someone tell me what i'm doing wrong please? Here is what I have put in the