locked
Change HTML pages to ASPX RRS feed

  • Question

  • Hello All. I am still a little hazy on ASP.NET but am trying to learn how to work with it.  I am hoping to change the pages in my website from html to aspx so that I may use the adrotator asp.net tool and hopefully some other tools later down the road. I found in another thread that I may do this by changing the file extension from htm or html to aspx. Is this all I need to do, or do I need to also change some markup in the code? Will all my pages still maintain their links to dynamic web templates? I am using a server that supports asp.net and know that I will be able to view my webpage their; but will I be able to preview the web pages on my computer? I have windows xp home edition and do not have any appropriate server softare, I was just wondering if expression web will enable me to preview.

    Thank you for your time and help, I appreciate it a great deal.

    Here is the website I am hoping to change.  www.fltnews.com
    Thursday, September 11, 2008 6:21 PM

Answers

  • No, it's not a simple matter of changing the page extension to .aspx.  Create a new page in EW, and select Aspx page.  What is in the Code view shows the basic requirements of an asp.net page.  The form that is created on the page is where the asp.net controls would go.

    EW can preview asp.net pages if, when you installed EW, you also installed the Development Server that comes with it, and have net framework installed on you computer.

    To check this, create an asp.net page, drag the asp.net calendar control onto it, into the form, save it, and preview it.  You should be able to see it.  (Double check that "Site -> Site Settings, on the Preview tab, has the development server selected for ASP.NET and PHP pages, at least.)

    DWTs are designed for HTML pages.  The corresponding templating function for aspx pages is called a Master page.  Asp.net puts the Master content onto the page at the server, which is different from a DWT, where EW blends the content during design time.  (File extension is .master  - not a file such as master.dwt, which is a DWT that happens to be named, "master".)

    Take a look at the EW tutorials on Microsoft's site, and scan for those dealing with master pages and asp.net:  http://expression.microsoft.com/en-us/cc197140.aspx

    Some more tutorials, many dealing with basic asp.net pages and databases (which is more than you are talking about, for the moment):  http://www.homepagedoctor.com/ExpressionTutorials/Tutorials.htm
    • Edited by KathyW2 Thursday, September 11, 2008 7:10 PM xyzzy
    • Marked as answer by Lori DirksModerator Sunday, November 23, 2008 4:37 PM
    Thursday, September 11, 2008 7:08 PM

All replies

  • No, it's not a simple matter of changing the page extension to .aspx.  Create a new page in EW, and select Aspx page.  What is in the Code view shows the basic requirements of an asp.net page.  The form that is created on the page is where the asp.net controls would go.

    EW can preview asp.net pages if, when you installed EW, you also installed the Development Server that comes with it, and have net framework installed on you computer.

    To check this, create an asp.net page, drag the asp.net calendar control onto it, into the form, save it, and preview it.  You should be able to see it.  (Double check that "Site -> Site Settings, on the Preview tab, has the development server selected for ASP.NET and PHP pages, at least.)

    DWTs are designed for HTML pages.  The corresponding templating function for aspx pages is called a Master page.  Asp.net puts the Master content onto the page at the server, which is different from a DWT, where EW blends the content during design time.  (File extension is .master  - not a file such as master.dwt, which is a DWT that happens to be named, "master".)

    Take a look at the EW tutorials on Microsoft's site, and scan for those dealing with master pages and asp.net:  http://expression.microsoft.com/en-us/cc197140.aspx

    Some more tutorials, many dealing with basic asp.net pages and databases (which is more than you are talking about, for the moment):  http://www.homepagedoctor.com/ExpressionTutorials/Tutorials.htm
    • Edited by KathyW2 Thursday, September 11, 2008 7:10 PM xyzzy
    • Marked as answer by Lori DirksModerator Sunday, November 23, 2008 4:37 PM
    Thursday, September 11, 2008 7:08 PM
  • Thank you for your help. I have been digging through the code view of html and aspx pages to see what is going on. Can I input the form into the body section and then change the extension to get it to work? If so, do I wrap all of the code inside the body in the form or just the portion where I want the asp.net controls? Can I change the body code in the dynamic web templates that everything is attached to to update the pages? I relize that master pages and dwt operate differently; just wondering if I can do this with my three templates rather than update all 450 pages (I screwed up waiting this long to change everything). Also, may I change the templates to master pages and then update each page to reference the master page (I don't think I'll do this just wondering if it is an option).?
    • Edited by Splanky47 Thursday, September 11, 2008 8:11 PM
    Thursday, September 11, 2008 7:42 PM