How Can I Check That A Submitted E-mail Adress Is Valid?
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
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.
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
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.
Whats the best way to retrieve the Address Book or any other component of Exchange Server?_ Note... this must be an ASP solution and the actual web server does not reside on the same physical location as Exchange.
I have an user.asp page(has html display) which displays the controls; After client-side validations, I do a document.form.submit() to a process asp page(no html, only server side processing and then redirects to the user.asp). This process asp calls some dll functions which might take a couple of hours if number of records to process is huge. Now, the dll opens a pop-up window which shows the status of the results(number of records processed and failed). After exactly 1 hour, the user.asp page says page cannot be found. Is it due to some timeout or something? What could be the reason?
Does anyone have a suggestion how I could debug this problem:
1. Data is collected from database and displayed in a form. 2. User updates data and submits it. 3. Submitted data is compared with old data. 4. SQL is generated for changes and put into an array. 5. SQL in the array is executed line by line.
I've copied the code which does the update from a working page that does something similar. And tested it with a basic update to be sure. But for some reason when I submit this sql:
update table set currency = 'USD' where currency = 'GBP' and company = 'LQ' and supplier_id = 'BCX0926' and invoice_no = '654664432'
IIS hangs and the browser displays a blank white page. At this point the whole site becomes unusable until I restart the IIS Admin service.
I've pasted the sql into Toad and tested it there and it works fine. Could anyone suggest what the problem is, or how I could go about debugging it. Normally when I get errors thet are written to the screen. But in this case, I dont get anything back at all. Code:
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")
I have form around a table. The form contains checkboxes for whihc elements are selected, and hidden fields listing the current value of the elements, and the line identifier for every line so I can tell precisely which subset of the table was visible to that person at that time.
I need to determine if a line that is not selected was prior to this submission. Something pseudocode-wise similar to:
If (Len(Request("DueDate-" & TheItem)) <> 0 ) AND (Request("DueDate").Contains(TheItem)) then
Where Request("DueDate-" & TheItem) contains the current value of the line (not blank since the entry has a length). The second part is what I have a problem with. Without manually looping through Request("DueDate") to do a search, I have no way to tell if Request("DueDate") (which contains a list of selected items) contains the line I am examining.
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.
I am trying to total the value of some form fields I am referecing the form field with an inner loop, I am having a little trouble because the amount of fields returned is always different, how can I roll-up the total of the form fields (request.form("subtotal_"& i)) to get one final figure? Code:
I know I've seen a tutorial on this, but can't locate it. I have a form that I've written that submits into a SQL database. I'd like it to fire off a notification email as well when an entry is submitted. Can someone point me to a tutorial that explains how I can do this?
I have a form with textboxes,and a select option(country)..onchange of select element,i reload the form because i hit database to get cities of country selected.. whatever info user has entered is being stored in session variables.
my problem..as the form gets submitted onchange event of select user is able to write in textboxes but this info does not get stored in session varibles(but info written in textboxes before select is used does get stored and i am able display again onload of the form). how can i tackle thisproblem.
I have a page where a user can submit a record for a new "applicant". After the user clicks Submit, I would like to send the user to a new page containg the "Applicant Number" which the user will need.
The applicant number is simply the autonumbering of the record in the table which is in a SQL Server db. How do I capture the record number(primary key) of the newly entered record in the table and send it to my new page?
I am looking for the best way to capture the time spent on a page and then write that to a txt file sitting on a server when the form is submitted. Right now I capture the time spent using javascript... I know i cannot write to a file using this. I am not looking to learn any in-depth ASP stuff... just looking for a simple solution if at all possible.
I'm trying to insert mutiple records into my database when the form is submitted.. My form has 4 textfields; serial1, price1, serial2 and price2.
I would like to insert serial1 and price1 as one record, then serial2 and price2 as the second record. I know some sort of loop has to be used to achieve this but i'm new to this and I don't know what to do...
I tried to do it with dreamweaver but it does not seem possible and the dreamweaver code seems really complicated I've only been able to insert only the first row(serial1,price1).. since I only have 2 fixed rows I guess what I need to do is to get dreamweaver to do it twice in a loop. Code:
I need some help: with cdosys i'm able to send e-mail from asp using the local exchange server. Now I also have to save the sent mail into the user's mailbox for future reference: how to?
I'm using CDO to send mail to the site owner from ASP pages with forms. Recently one of my forms is occasionally sending email with what seems to be an insertion which is replacing the plain text part of the email with something else. Looking at the server sent email source, the hacked emails have the following:
Here's the scenario. I'm currently using cdosys/asp to send mail to our SMTP server. We use a product called MailFilter to check for SPAM. It doesn't work very well. If MailFilter isn't working cdosys also has problems and emails don't get sent. As these email are confirmations for customer's bookings this means lots of customers calling to see where their confirmation emails have gone. The root of the problem is MailFilter but that here to stay. So I had this thought of sending the message to a queue of some sort so at least they will get to the customer eventually rather than being lost for good. So here's the question:
Can I/How do I send messages to a mailbox on our exchange server using cdo.message?