tags:

views:

27

answers:

3

I am trying to build a website consist of three pages but with a contact form using ASP.NET. Now that I have build the layout and all xhtml/css and some javascript and next I wan to convert it so that it's dynamic and can send email.

Do I need to convert it using Visual Studio or just rename files from .html to .aspx? and then create a form in Visual studio?... Confused :(

A: 

First, ASP.NET is a server side technology. What is rendered on the browser is still the same old plain HTML/XHTML coupled with CSS and Javascript (or its variations like jQuery). So there is no difference. Look at the (X)HTML generated and you can make out what changes ou need to do. To make the things simpler, you can just modify your CSS for this.

Kangkan
A: 

What you could do is the following:

  1. Create a new ASP.NET Web Project
  2. Add the existing HTML files in to that project.
  3. Add a Contact ASPX page for sending mail etc If required.
  4. You could then display the ASPX page within the HTML page using an iframe
Barry
+1  A: 

I would recommend the following steps:

  1. If you haven't already done so, start with some ASP.NET tutorial, create a project and build a simple page with code behind, just to get a feeling of how ASP.NET works.

  2. Once you're familiar with ASP.NET, create a new project. Rename your contact form to aspx and add it to your Visual Studio project.

  3. Write code behind (hint: have a look at the documentation of the MailMessage class) that sends the mail.

Heinzi
I have some very basic concept of ASP.NET but what I want to know to clear my concept is the workflow of design and programming ASP.NET. Do you use Visual Studio to create all designs or just for logic or programming code behind?
Zai
Personally, I use Visual Studio not only for the development but also for the web page design (using the HTML source editor mostly). This, however, is not a requirement. Others use Expression Web or some third-party software for the design.
Heinzi