473,414 Members | 1,862 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,414 software developers and data experts.

Converting HTML to ASPX

Is there a function in VS or a utility that will take an HTML file and create
a code-behind ASPX page?

The idea is, I'd like to be able to have someone develop beautiful, fully
functional HTML pages and then pull them in and convert them to ASPX
WebForms, doing a bunch of things like: Convert various standard html tags to
<ASP:...equivalents, etc., etc.

Any ideas?

Alex
May 7 '07 #1
6 12408
No there isn't a utility. You have to understand the object model to
determine whether to use a html control or an asp.net control in converting
a page, also, the submission method used, layout, javascript and stylesheets
may not lend themselves easily to code behind or any form of
auto-conversion. Its best done manually, but usually from a basic html
design as your expecting.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog

"Alex Maghen" <Al********@newsgroup.nospamwrote in message
news:37**********************************@microsof t.com...
Is there a function in VS or a utility that will take an HTML file and
create
a code-behind ASPX page?

The idea is, I'd like to be able to have someone develop beautiful, fully
functional HTML pages and then pull them in and convert them to ASPX
WebForms, doing a bunch of things like: Convert various standard html tags
to
<ASP:...equivalents, etc., etc.

Any ideas?

Alex

May 7 '07 #2
Well, I was hoping to find some utility that could at least help me based on
rules *I* establish. Really, the only thing I'd love to be able to do is
convert HTML control tags to ASP.NET control tags throughout a page. But I
supposed I can do it with sophisticated search and replace of my own. I'm
just lazy and other people do these things better than I.

Alex
"John Timney (MVP)" wrote:
No there isn't a utility. You have to understand the object model to
determine whether to use a html control or an asp.net control in converting
a page, also, the submission method used, layout, javascript and stylesheets
may not lend themselves easily to code behind or any form of
auto-conversion. Its best done manually, but usually from a basic html
design as your expecting.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog

"Alex Maghen" <Al********@newsgroup.nospamwrote in message
news:37**********************************@microsof t.com...
Is there a function in VS or a utility that will take an HTML file and
create
a code-behind ASPX page?

The idea is, I'd like to be able to have someone develop beautiful, fully
functional HTML pages and then pull them in and convert them to ASPX
WebForms, doing a bunch of things like: Convert various standard html tags
to
<ASP:...equivalents, etc., etc.

Any ideas?

Alex


May 7 '07 #3
There is no built in utility. A custom solution is really your only option..

You might get lucky and stumble across someone else's effort, but even then it might not produce your desired results because
formatting of html isn't truly standardized. Folks generally use their own preference as to how (x)html is presented and organized.

"Alex Maghen" <Al********@newsgroup.nospamwrote in message news:37**********************************@microsof t.com...
Is there a function in VS or a utility that will take an HTML file and create
a code-behind ASPX page?

The idea is, I'd like to be able to have someone develop beautiful, fully
functional HTML pages and then pull them in and convert them to ASPX
WebForms, doing a bunch of things like: Convert various standard html tags to
<ASP:...equivalents, etc., etc.

Any ideas?

Alex

May 7 '07 #4
Hi Alex,

I'm afraid so far there is no built-in utiltity that can help directly
convert a HTML file to an aspx/codebehind pair.

BTW, for those simple html input elements or some controls that has Html
server controls mapping to them, you can add a runat="server" attribute so
as to make them become an ASP.NET server control.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
May 8 '07 #5
Well yes, *exactly*. Even the job os inderting "runat="server" into 50
controls on 85 pages is a nightmare!

See, one of the things that is so promising about ASP.NET 2.0 and later is
the clean ability to separate design/display from code. But in real life, the
way that happens is the one person builds HTML pages (usually first) and
another person "codes" them. Usually afterward. In big companies, the
HTML/design is often outsourced, which means it comes in as ".htm" pages that
you can open, click through, etc. THEN you need to turn them into ASPXs and
do the coding.

Looks like it's time for me to start writing some utility software. Maybe MS
will buy it from me for a billion dollars next year :)

Alex

"Steven Cheng[MSFT]" wrote:
Hi Alex,

I'm afraid so far there is no built-in utiltity that can help directly
convert a HTML file to an aspx/codebehind pair.

BTW, for those simple html input elements or some controls that has Html
server controls mapping to them, you can add a runat="server" attribute so
as to make them become an ASP.NET server control.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
May 8 '07 #6
What your seeing as an approach is how its done in business, and will be for
some considerable time. What makes it much easier with .net 2.0 is the
ability to make use of master pages so that your designing once, and and
using that presentation layer centrally. Its not an easy task to seperate
presentation from logic once you have them already integrated, but starting
from the concept that presentation is a single entity and centrally managed
and changed makes life very easy when it comes to changing the brand of a
site built on this concept later.
Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Alex Maghen" <Al********@newsgroup.nospamwrote in message
news:A7**********************************@microsof t.com...
Well yes, *exactly*. Even the job os inderting "runat="server" into 50
controls on 85 pages is a nightmare!

See, one of the things that is so promising about ASP.NET 2.0 and later is
the clean ability to separate design/display from code. But in real life,
the
way that happens is the one person builds HTML pages (usually first) and
another person "codes" them. Usually afterward. In big companies, the
HTML/design is often outsourced, which means it comes in as ".htm" pages
that
you can open, click through, etc. THEN you need to turn them into ASPXs
and
do the coding.

Looks like it's time for me to start writing some utility software. Maybe
MS
will buy it from me for a billion dollars next year :)

Alex

"Steven Cheng[MSFT]" wrote:
>Hi Alex,

I'm afraid so far there is no built-in utiltity that can help directly
convert a HTML file to an aspx/codebehind pair.

BTW, for those simple html input elements or some controls that has Html
server controls mapping to them, you can add a runat="server" attribute
so
as to make them become an ASP.NET server control.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.

May 8 '07 #7

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

Similar topics

7
by: RCS | last post by:
Okay, a rather 'interesting' situation has arisen at a place I work: I need to convert a database from Access to something that can be used over the web. I am currently maintaining and...
2
by: Dave | last post by:
I am converting an ASP Classic web site to an ASP.NET application and have some real basic formatting or design questions. (The classic ASP site has both code (forms) and content pages.) 1.When...
9
by: Stephen H. | last post by:
Hi, I have an existing web application with java beans that I wanne migrate to ASP.NET using C#. The existing web application has some jsp files that use java beans as follows: .... <%@...
4
by: jason | last post by:
i'm working on a gradual conversion of an ASP classic web site to ASP.NET. a recent body of work involves adding a new asp page to the existing site. i thought this would be a good opportunity to...
1
by: amitbadgi | last post by:
Hi I am converting an asp application to asp.net, I am geeting the following error, Compiler Error Message: BC30201: Expression expected. Source Error: Line 299:<li><a
2
by: Ben Amada | last post by:
Hello, A partner is going to be creating some HTML files that I plan on converting to user controls (UC) and dynamically load at runtime. I'm guessing Visual Studio doesn't come with some...
11
by: Nathan Sokalski | last post by:
I add several JavaScript events (onchange, onkeypress, etc.) to Controls using the Add method of the Attributes collection. However, if the JavaScript code contains certain characters, such as & or...
5
by: k.vanderstarren | last post by:
Hi All, I'm trying to convert some ASP.NET code that I found at http://weblogs.asp.net/dannychen/archive/2005/12/02/432190.aspx from VB to C#. I've managed to convert the portion that is in...
25
by: Blasting Cap | last post by:
I keep getting errors that pop up when I am trying to convert an application from dotnet framework 1.1 to framework 2.0. The old project was saved in sourcesafe from Visual Studio 2003, and I have...
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...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.