Html to web forms

Discussion in 'ASP .Net' started by John, Oct 2, 2004.

  1. John

    John Guest

    Hi

    I have an enquiry form which posted to an asp script for processing. Is
    there a way to automatically/easily convert into an asp.net webform for
    event driven programming?

    Thanks

    Regards
    John, Oct 2, 2004
    #1
    1. Advertising

  2. John

    Karl Guest

    John,
    One of the quickest ways is to use HtmlControls instead of WebControls.
    They aren't as flexible/powerful of WebControls but allow for a really quick
    conversion. Simply add a runat="server" and id="SomeID" to each of your
    would-be controls and you'll have a programming model available
    (events,properties...)

    was:
    <table>
    <tr>
    <Td>Username: </td>
    <td><input type="textbox" name="username" ></td>
    </tR>
    <tr>
    <Td>Password: </td>
    <td><input type="password" name="password" ></td>
    </tr>
    <tr>
    <Td colspan="2"><input type="submit" value="login"></td>
    </tr>
    </table>

    now:

    <table>
    <tr>
    <Td>Username: </td>
    <td><input runat="Server" id="username" type="textbox" name="username"
    /></td>
    </tR>
    <tr>
    <Td>Password: </td>
    <td><input runat="server" id="username" type="password" name="password"
    /></td>
    </tr>
    <tr>
    <Td colspan="2"><input runat="server" id="username" type="submit"
    value="login"></td>
    </tr>
    </table>

    Karl


    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "John" <> wrote in message
    news:%...
    > Hi
    >
    > I have an enquiry form which posted to an asp script for processing. Is
    > there a way to automatically/easily convert into an asp.net webform for
    > event driven programming?
    >
    > Thanks
    >
    > Regards
    >
    >
    Karl, Oct 2, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brendan Miller

    Web Forms VS Windows Forms

    Brendan Miller, Aug 11, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    5,054
    Kevin Spencer
    Aug 11, 2003
  2. jlopes151
    Replies:
    2
    Views:
    601
    Steve C. Orr [MVP, MCSD]
    Mar 14, 2005
  3. =?Utf-8?B?ZGF2aWQ=?=

    embedded windows forms into web forms for control

    =?Utf-8?B?ZGF2aWQ=?=, Apr 7, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    5,194
    =?Utf-8?B?ZGF2aWQ=?=
    Apr 10, 2005
  4. Arsen V.
    Replies:
    7
    Views:
    809
  5. Eric
    Replies:
    2
    Views:
    458
Loading...

Share This Page