Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ASP Contact Form Script

Featured Replies

Hi,

 

Any help with this would be great, as it's doing my head in!

 

I need to create a form to email script for a website contact form, that works on a Windows based server. I assume this needs to be an ASP script. As I usually use PHP for this kind of thing, I haven't got a clue about ASP.

 

Basically, I just need a script that sends the form contents to the clients email address after validating the entries. Ideally, it would show any validation errors on the same page as the form. If successful, it would then redirect to a "Thank you" page.

 

I've tried customising various scripts that I've googled, but I'm totally clueless.

 

Any help or links would be appreciated.

Hi There,

 

I have the same trouble recently but i found an awesome solution Here, they use Visual Web Developer Express Edition, free software, there are hundreds of tutorial videos there, go have a look.

 

Kind Regards

 

Shane

  • Author

We talking here about Classic ASP or .NET ?

 

Hi,

 

The clients hosting package is with 123-Reg. It states on their support site that they support ASP (which I presume is Classic) and ASP.net Framework versions 2.0, 3.0 & 3.5.

 

Cheers

Hi,

 

The clients hosting package is with 123-Reg. It states on their support site that they support ASP (which I presume is Classic) and ASP.net Framework versions 2.0, 3.0 & 3.5.

 

Cheers

 

Hi ,

 

Try this : http://www.eaglefreelance.co.uk/email%20form.rar

I archived files for this contact form .

 

Just remember that SendEmail.vb goes to "App_Code" folder.

  • Author

Hi ,

 

Try this : http://www.eaglefreelance.co.uk/email%20form.rar

I archived files for this contact form .

 

Just remember that SendEmail.vb goes to "App_Code" folder.

 

Hi EagleFreelancer,

 

Thank you so much for your help. Sorry for being a pain, but I'm still having no luck with this form. I would be grateful if you could tell me where I'm going wrong.

 

I'm not sure what you meant when you said "SendEmail.vb goes to "App_Code" folder".

 

I've edited SendEmail.vb with the hosts SMTP address (SmtpClient) and email login (Net.NetworkCredential) details.

 

I've also edited Default.aspx.vb with the clients email address (sSendMessage) and subject text.

 

Finally, I uploaded SendEmail.vb, Default.aspx.vb and Default.aspx to the host server and tried to access Default.aspx via the browser. The following error message occurred.

 

HTTP Error 404.8 - Not Found

The request filtering module is configured to deny a path in the URL that contains a hiddenSegment section.

 

Any help would be appreciated.

Cheers

In .NET there are several "special folders" for your files, database etc.

App_Code is one of them. You need to create App_Code folder in the root folder of your application and put the file there.

 

There's another thing that may cause a problem. In Default.aspx you can find this line ( first line )

<%@ Page Title="" Language="VB" MasterPageFile="~/Main.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Contact_Default" %>

 

If your application doesn't use Master Page then you'll need to delete following : MasterPageFile="~/Main.master"

 

I've never come across HTTP Error 404.8 - Not Found error :/

Is Web.config file included in your application ?

Is it just .net app. or you use other programming languages ?

 

If you send it to me I could have a look and find out whats causing those errors.

  • Author

In .NET there are several "special folders" for your files, database etc.

App_Code is one of them. You need to create App_Code folder in the root folder of your application and put the file there.

 

There's another thing that may cause a problem. In Default.aspx you can find this line ( first line )

<%@ Page Title="" Language="VB" MasterPageFile="~/Main.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Contact_Default" %>

 

If your application doesn't use Master Page then you'll need to delete following : MasterPageFile="~/Main.master"

 

I've never come across HTTP Error 404.8 - Not Found error :/

Is Web.config file included in your application ?

Is it just .net app. or you use other programming languages ?

 

If you send it to me I could have a look and find out whats causing those errors.

 

Hi,

 

Sorry, this is becoming a bit of a saga. Still not working.

 

Do I need to enable or install ASP.net on the host server or do I need to install an ASP.net application on my home computer and then upload. I haven't got an App_Code folder, Web.config file or anything like that on the hosting server. All I can see on the host webspace is the already uploaded HTML files.

 

I just assumed you could upload the files to an ASP supported server and they would work (like PHP on a Linux server).

 

Error message......

 

HTTP Error 404.8 - Not Found

The request filtering module is configured to deny a path in the URL that contains a hiddenSegment section.

 

Request filtering is configured for the Web server and it contains a hiddenSegments section that allows the server administrator to deny access to specific directories.

 

Cheers

Hi ,

http://www.eaglefreelance.co.uk/form.rar

I tested that one with classic asp. I have a classic asp app. and asp.net contact form.
It works fine.

App_Code folder with SendEmail.vb file in it goes to your app root folder.
Default.aspx and Default.aspx.vb goes to your "contact us" folder.


But first of all make sure your server supports .NET ( min. framework 2.0 ) and it's enabled.

Edited by teodora

  • Author

Hi ,

 

http://www.eaglefreelance.co.uk/form.rar

 

I tested that one with classic asp. I have a classic asp app. and asp.net contact form.

It works fine.

 

App_Code folder with SendEmail.vb file in it goes to your app root folder.

Default.aspx and Default.aspx.vb goes to your "contact us" folder.

 

 

But first of all make sure your server supports .NET ( min. framework 2.0 ) and it's enabled.

 

If you're still having some problems, email me : summon2008@yahoo.com

 

Hi,

 

It works. Thank you so much for your time and patience. You're an absolute life saver.

 

I'm going for a lie down now.

 

All the best

Jon

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.