XHTML/CSS layout to ASP.NET
I am tryi开发者_如何学Pythonng 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 :(
I would recommend the following steps:
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.
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.
Write code behind (hint: have a look at the documentation of the MailMessage class) that sends the mail.
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.
What you could do is the following:
- Create a new ASP.NET Web Project
- Add the existing HTML files in to that project.
- Add a Contact ASPX page for sending mail etc If required.
- You could then display the ASPX page within the HTML page using an iframe
精彩评论