Html to web forms

J

John

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
 
K

Karl

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top