HTML 2 ASP.NET ?

  • Thread starter Thread starter Mark Rae
  • Start date Start date
M

Mark Rae

i have theese static html pages
what is the best way to replace the content w/ .NET dynamic data w/o
loosing all the formating?
I have VS.NET, but will prefer to write the aspx code w/o designer.
Is there some straight way to replace say every HTML form w/ an
ASP one?

Are you wanting to replace them because you need to turn their static
content into dynamic content? If not, then just leave them the way they
are...
 
I'm not sure I clearly understand what you want, but I'll give this a
stab. You are talking about HTML forms into ASP forms and I don't think
this is directly doable (I could be wrong). The reason being is ASP.NET
wouldn't be able to address the Control heirarchy and persist ViewState
for you. It would simply render out the "html" with no server side
abilities.

If you are simply talking about text content and not HTML form elements,
then this is a simple matter of cut & paste into a SQL table with a
little development of a control to grab the data.

Clint Hill
H3O Software
http://www.h3osoftware.com
 
yeap, i need dynamic data from a database

In which case, you'll pretty much need to create the ASPX pages from
scratch. But, any formatting that's possible in raw HTML is perfectly
possible in ASP.NET.
 
i have theese static html pages
what is the best way to replace the content w/ .NET dynamic data w/o
loosing all the formating?

Write an asp.net application that pulls the data out of the database and
formats the content the same was as your current HTML page is formatted.

There's no 'automated' way to do what you are asking.

-Darrel
 
The problem is i am not any good at HTML, the pages are already written by
a
profecinal
designer, updates are now done manually :( and i heard VS.NET designer
produces very messy markup.
Do u know of some table listing ASP.NET server componets similar to the
different HTML
interface elements or some conversion software?

ASP.net's default controls are pretty bad when it comes to producing clean,
semantic, standards compliant markup.

Plus, you still have the issue of formatting the specific content on your
page.

You really need to do this with some custom programing. There really isn't
any way around this.

-Darrel
 
The problem is i am not any good at HTML, the pages are already
written by a profecinal
designer, updates are now done manually :( and i heard VS.NET designer
produces very messy markup.
Do u know of some table listing ASP.NET server componets similar to
the different HTML
interface elements or some conversion software?

No such software. Use the HTML as a template and add dynamic controls to
the page - replacing the static text. That is probably your easiest
solution.
 
hi,
i have theese static html pages
what is the best way to replace the content w/ .NET dynamic data w/o
loosing all the formating?
I have VS.NET, but will prefer to write the aspx code w/o designer.
Is there some straight way to replace say every HTML form w/ an
ASP one?

TIA
 
yeap, i need dynamic data from a database

Mark Rae said:
Are you wanting to replace them because you need to turn their static
content into dynamic content? If not, then just leave them the way they
are...
 
If you're looking for some kind of uber-basic content management solution --
say, to allow non-technical users to update defined parts of a webpage --
you could look at some off-the-shelf product like Macromedia Contribute. It
would be easier than setting up a code-based solution, which is what you're
asking here.

If you don't know how to code, there isn't a quick and painless way to do
what you wanna do.

-KF
 
The problem is i am not any good at HTML, the pages are already written by a
profecinal
designer, updates are now done manually :( and i heard VS.NET designer
produces very messy markup.
Do u know of some table listing ASP.NET server componets similar to the
different HTML
interface elements or some conversion software?
 
Do u know of some table listing ASP.NET server componets similar to the
different HTML interface elements ...?

Converting an html page to an aspx one is not so complicated.

1. Start a new web application project.
2. Add a new web form for every page.
3. For every page copy/paste the html content to the new web form in Html
view.
4. Add runat="server" attribute to those of your existing html controls you
want to make dynamic. You will also need to set the id attribute.
5. For every page switch to the Design view, wait for a few seconds and
switch back to the Html view. Press ctrlZ twice to undo the formatting mess
introduced by the Visual Studio.
6. View code-behind. You will find that the Visual Studio created a server
control for every html control with runat="server".
7. Start programming your pages.

That's about it.

Eliyahu
 
u could at least say "wait for ASP.NET 3.0" ^_^
ok, say i have an HTML label, how do i write an ASP label
that rendres w/ the same size, color and triggers the same
JavaScript functions?

Why use an ASP label?

Just use the HTML label and put runat="server" in it. Then you can still put
your inline javascript and CSS if you wish.

-Darrel
 
:(
u could at least say "wait for ASP.NET 3.0" ^_^
ok, say i have an HTML label, how do i write an ASP label
that rendres w/ the same size, color and triggers the same
JavaScript functions?
 
tnx a lot

Eliyahu Goldin said:
Converting an html page to an aspx one is not so complicated.

1. Start a new web application project.
2. Add a new web form for every page.
3. For every page copy/paste the html content to the new web form in Html
view.
4. Add runat="server" attribute to those of your existing html controls
you
want to make dynamic. You will also need to set the id attribute.
5. For every page switch to the Design view, wait for a few seconds and
switch back to the Html view. Press ctrlZ twice to undo the formatting
mess
introduced by the Visual Studio.
6. View code-behind. You will find that the Visual Studio created a server
control for every html control with runat="server".
7. Start programming your pages.

That's about it.

Eliyahu
 
tnx

darrel said:
Why use an ASP label?

Just use the HTML label and put runat="server" in it. Then you can still
put
your inline javascript and CSS if you wish.

-Darrel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top