Results 1 to 5 of 5

Thread: Converting DreamWeaver Created Htm File Into aspx file

  1. #1

    Thread Starter
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336

    Converting DreamWeaver Created Htm File Into aspx file

    Hi, i don't like asp.net's ability to create htm files. Dreamwaever is MUCH beter. BUT i need/want to use ASP.NET to add my code.

    When i open a dreamweaver created htm file into asp.net it opens fine and looks fine but when i double click on a button to insert code it creates a
    VB Code:
    1. <script id=clientEventHandlersJS language=javascript>
    2. <!--
    3.  
    4. function Button1_onclick() {
    5.  
    6. }
    7.  
    8. //-->
    9. </script>

    instead of it creating an .aspx.vb file and letting me insert my code. I changed all the header information to
    VB Code:
    1. <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication4.WebForm1"%>
    2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    3. <HTML>
    4.     <HEAD>
    5.         <title>WebForm1</title>
    6.         <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
    7.         <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
    8.         <meta name="vs_defaultClientScript" content="JavaScript">
    9.         <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    10.  
    11. </HEAD>

    But it still isn't acting right. Any idea what i can do to get the HTML editing capapbilites of Dreamweaver and also use VS.NET to code my ASP.Net pages?

    Thanks!
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


  2. #2
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803
    I think it HAS to have the .aspx extension
    And also, every aspx file has to have a form tag, and ONLY ONE form tag...
    And also, all the buttons has to have a runat="server"...

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    It is better to copy and paste the html into VS.Net aspx page. Then go through and fix all the stuff and add the proper declarations at the top of the page.

  4. #4

    Thread Starter
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336
    OK thanks. I kinda got it sorted out, but why can you only have 1 form tag? Say i want several different actions per page depending on what button the user clicks..
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


  5. #5
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    As long as all the buttons are in the form tags, and the event handlers are in place for the buttons, when the page gets posted back, the button that was pushed has its event fired. In that event is where you perform your specific action.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width