473,385 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

asp.net from html

Hi

A client has provided an html sample page to be used as "template" for an
asp.net enquiry form to maintain their intended look and feel. Info from the
asp.net form is to be emailed on submission of form. I am not sure how to go
from here in transition from an html layout to a page which incorporates
enquiry form elements in asp.net. Do I need to convert the html page into a
web form? How? Something else I should rather do?

Some elaboration would be appreciated, I am a complete newbie to asp.net and
have only just started switching from asp.

Thanks

Regards
Nov 18 '05 #1
2 1329
Hi John:

I don't think there is a set formula you can go through, but if you
are going to work in asp.net the plan should be to convert the
controls on the HTML page into server side controls. Create a new web
form in VisualStudio .NET. Move the HTML page into the form by copying
over pieces of the HTML or modifying the form (i.e. copy over any
<link> tags, styles, and <table> elements).

The important step is to convert to server side controls. An input
type = "text" becomes an <asp:TextBox>, an input button becomes an
<asp:Button>.

You will want to read some introductory material on ASP.NET first if
you have not done any asp.net forms development. Here is one tutorial:
http://msdn.microsoft.com/library/de...rowebforms.asp

There are plenty more you can find with Google.

HTH,

--
Scott
http://www.OdeToCode.com/

On Sat, 2 Oct 2004 14:25:28 +0100, "John" <Jo**@nospam.infovis.co.uk>
wrote:
Hi

A client has provided an html sample page to be used as "template" for an
asp.net enquiry form to maintain their intended look and feel. Info from the
asp.net form is to be emailed on submission of form. I am not sure how to go
from here in transition from an html layout to a page which incorporates
enquiry form elements in asp.net. Do I need to convert the html page into a
web form? How? Something else I should rather do?

Some elaboration would be appreciated, I am a complete newbie to asp.net and
have only just started switching from asp.

Thanks

Regards


Nov 18 '05 #2
You're on the right track. ASP.NET is built on webforms.

Here's a good intro to webforms if you're just getting started:
http://www.dotnetjunkies.com/quickst...ormsintro.aspx

There are a few ways to get the HTML onto a new webform. If you're
using Visual Studio.NET, the easiest way is to Copy / Paste it in:
1. Create a new ASP.NET project in Visual Studio.NET
2. Open the HTML page in your browser
3. Copy the page to the clipboard: Edit / Select All, then Edit / Copy
4. View your webform (Webform1.aspx is the default name) in design mode
5. Right-click on the empty form and select Paste.

If you don't have Visual Studio, I suggest you download WebMatrix:
http://www.asp.net/webmatrix/default...dex=4&tabId=46

You can probably use the Copy / Paste approach there, too.

Once your HTML is in a webform, you're ready to get started on
conversion to ASP.NET controls. You don't have to, but it makes things
easier. For instance, you'd change HTML <input type=text> to
<asp:textbox>. You can also just right-click on form elements and
select "Run as server control".

Once you've either changed the submit button to an <asp:Button> or
changed it to run as a server control, you can just double click on it
and write your submit code there. If you've worked with Visual Basic
before, it should seem very familiar.

This page has some good sample code for sending the results of a
webform post via e-mail:
http://www.developer.com/net/asp/article.php/3096831

Hope this helps get you started.

- Jon
http://weblogs.asp.net/jgalloway

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: VK | last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked" question. This question led to a long discussion about the naming rules applying to variables, objects, methods and properties...
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
1
by: cirillo_curiosone | last post by:
Hi, i'm new to javascript. I started studing it on the web few weeks ago, but still haven't been able to solve one big problem: HOT TO PASS VALUES FROM A SCRIPT VARIABLE TO A CHILD HTML...
33
by: LRW | last post by:
http://gto.ie-studios.net/index.php When you view the above site in IE, if the 1st of the three product images is tall enough to push the cell down a couple of pixels, IE somehow doesn't show...
0
by: Boris Ammerlaan | last post by:
This notice is posted about every week. I'll endeavor to use the same subject line so that those of you who have seen it can kill-file the subject; additionally, Supersedes: headers are used to...
9
by: Patient Guy | last post by:
Taking the BODY element as an example, all of its style attributes ('alink', 'vlink', 'background', 'text', etc.) are deprecated in HTML 4.01, a fact noted in the DOM Level 2 HTML specification. ...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
6
by: Guy Macon | last post by:
cwdjrxyz wrote: HTML 5 has solved the above probem. See the following web page: HTML 5, one vocabulary, two serializations http://www.w3.org/QA/2008/01/html5-is-html-and-xml.html
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.