I use the following code to chck for a working url. It does work for some, but sites that seem to be written in PHP, and google, seem to return a "fail" - I can't figure out how to get p-ast this.
Dim objHTTP
Dim sHTML
Set objHTTP = Server.CreateObject ("Microsoft.XMLHTTP")
objHTTP.open "GET", strURL, False
objHTTP.send
sHTML=objHTTP.statusText
if err or sHTML<>"OK" Then
sTxt="fail"
else
sTxt="ok"
End if
Set objHTTP=nothing
else
sTxt="fail"
End if
I have one asp page in which i ask the user to enter the path. This then transfers the control to next asp page. In the next page i want to check whether the path is valid or not. I know there are methods of FileSystemObject like DriveExists, FolderExists and FileExists but these has to be used individually.
Suppose the user enters the path as "D:" then i should use DriveExists and if the user enter the path as "D:/test" the i should use FolderExists i.e i have to use individual functions. How to check this using one function only
Another problem is that i want to display the message on the page for some seconds and then the control should transfer to next page. How do i go about it.
Say I retrieve and e-mail adress from a form like this, then I know how to check that it's not empty, contain numbers etc. but I don't know how to check that the e-mail complies with some kind of regular expression or the like.
Therefore I wonder if you have any good e-mail form validation code that can be used on the server side (comparable to Java Script reg.exp on the client side).
<%
Dim mail mail = request.form("email")
IF mail = "" or mail does not complain with some kind of reg. exp THEN
how to write to check verification valid email thru nslookup or mx record or dns record. Is it possible to do that. Is there any tutorial from sitepoint, previously found it but i lost the link.
example to check assume test@domain.com is not a real email, abc@domain.com is real email how do u check it.
strQ = "SELECT *" strQ = strQ & " FROM Receipt" strQ = strQ & " WHERE Receipt.Expense ='Inventory' AND Receipt.ReceiptDate Between #1/1/2005# And #12/31/2005#" strQ = strQ & " ORDER BY Receipt.ReceiptDate"
What I like it to do is select all references to "Inventory" under the field Expense for the entire year of 2005, with the results sorted by date ascending.
i downloaded soem code that is a way to view a MS access db with asp. The error I get is Not a valid file name. Microsoft JET Database Engine error '80004005' . I know it might not be enough information, but anyone have any clues? Code:
If you use ASP.NET you can still make valid xhtml code right? Becuase Visual Studio .NET 2003 doesn't care if it's <br> or <br /> thats bad in my opinion =) You know if Whidbey will make better xhtml?
The field name 'articleid', which is an identity/primary key , is not being recognized in my recordset as I get an " Item cannot be found in the collection corresponding to the requested name or ordinal" error with the following- the line number that the error message points to is on my response.write for the rsid("articleID") :
dim sqlid,rsid sqlid = "SELECT max(ArticleID) from tblarticles" Set rsid = Server.CreateObject("ADODB.Recordset") rsid.Open sqlid,sqlc,3 response.write rsid("ArticleID")
When I'm trying to start the smtp virtual server the status of the smtp server is showing 'the requested Control is not valid for this service' Its state is shown as unknown.Wat ay be the reason. The messages I'm sending is going to the pick up directory from there its not taking
If so, does the " :$SO " mean anything special? I'm going through a web application written by somebody else (who I don't have contact with...) and it's littlered with these types of session variables.
Why does the error below occur whenever the statement Request.BinaryRead Request.TotalBytes) is executed for uploads larger than 100K? I thought the 100K limit applied only to Request.Form. This does not occur with smaller uploads. This is running on an IIS 6 server with full FP2002 extensions.
when the asp page is Request("txtName").i can use "testpage.aspx?txtName=User1" to post the value.but when i use Request.Form("txtName").i cannot use that method,what can i do to solve that problem.(as i cannot modifty the request.form syntax but i need to post data to that web page, is there any method so that i can pass that parameter?)
I'm working on a "hybrid" application some classic ASP, and some asp.net. I'm trying to develop a support type page that checks necessary components, database connections etc.. last item is to check for the .NET extensions. Is there a way to do that from a classic ASP page?
I am working on a website that requires a login before accessing an appointment book application written in ASP.Basically what I want to do is when the customer first clicks on "appointment_book" link, it takes them to the registration form. After they are registered, It will then redirect them to the actual application. I also want the same thing to happen when a customer clicks on the login link. I want them to login, then get redirected to the appointment_book. at the moment the customer click on the registratration link and it shows them the registration form, they are then automatically logged in after registration. However, when I click on the Appointment_book link again, it brings me back to registration form. How can I have the link always point to the appointment book after they are registered or logged in?
can i restrict that only domain1.com can access to http://www.xxx.com/file.asp page? so when user suft http://www.xxx.com/file.asp, they unable to view the content.both domain is on diff IP.
I have a form with several check boxes.they are all set to default to "unchecked."The db also defaults to unchecked.But,as soon as we hit the "form1.recordset.addnew" all of the cb's change themselves to "checked."?
Does anyone know of any nice ready made asp scripts to check a website's visitors age? I mean the sort of thing you see where you have to choose your day, month and year of birth from drop down lists to comply with US laws Code:
I'm trying to guard against SQL injection, but I have an ID number being embedded into a querystring for MSSQL table selection.
Is it good enough just to check if the querystring value is an int, if so could you quickly remind me how to check that. In PHP we use is_numeric or is_int.
I moved an ASP app to a new Win03 server. The sendmail function using CDO in all ASP appls suddenly stopped working. It worked fine on the previous server (also Win03/IIS6.0). Where should I go to check?
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 have a form that a user submits their clan's website, and roster page. What I want to do, is check to see if the field submitted contained "http://" and if not, add it to the field submission.
I know i can make this easier, and put the http:// in the field as a default value, but i want to know how to do this with a bit of form validation or something.