473,804 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1343
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.in fovis.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
8409
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 in JavaScript/JScript and HTML/XML elements. Without trying to get famous :-) but thinking it would be interesting to others I decided to post the following summary: 1. Variable names in JavaScript/JScript
4
2977
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 email by creating a text file, with content following certain format, and saving that file into the correct '..\mailroot\pickup' folder, and it is working fine
1
2429
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 GENERATED BY FUNCTION. Here'e the point: I'm writing a simple website for showing my photographs. It has a central page with many links (as many as galleries are).
33
4788
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 that happening. But if you look at it in Firefox you can see the small gap of white where the semi-circle image is broken. I've tried changing the background colors to gray in cells and tables
0
395
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 ensure that only one copy resides on a given news server. This notice was last updated on March 9th, 2005, and is available (with a complete revision history) on the World Wide Web at http://www.stack.nl/~boris/HTML/ciwahfaq.html. Most of it was...
9
2012
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. The DOM specification does not explicitly itself deprecate the use of attributes however for the element in the interface definition section I read. Is there text in the DOM specification that states specifically that the DOM specification...
5
3599
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 that for server control component , code is running on the server side. But if I take as example a Label. I place on a webform an HTM label control and a WebForm label control, I could see that properties are different for
6
433
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
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10603
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7643
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3836
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.