HTML Form Elements to WEB Controls

dev2dev

Newcomer
Joined
Jan 4, 2005
Messages
15
Hi,
I have lot of html pages which i need to convert to aspx
In this process, I want to convert all html form elements to web controls

My all pages have followed a company standard which will ease the process of converting them.

eg:

<INPUT id="opp10" tabIndex="8" maxLength="255" name="opp10">

this want to replace with
<asp:textbox id="opp10" tabIndex="8" maxLength="255"></asp:textbox>

ex:
<SELECT id="opp5" tabIndex="3" name="opp5">
<OPTION value="" selected>--None--</OPTION>
<OPTION value="New Business">New Business</OPTION>
<OPTION value="Follow-On Business">Follow-On Business</OPTION>
</SELECT>
replace string
<asp:dropdownlist id="opp5" tabindex="3">
<asp:listitem value="" selected=true">--none--</asp:listitem>
...

Please help me in the regard

thank you
 
Data gathering

Before we begin, how much experience in general do you have with regular expressions? There are many ways to approach your goal, and it will help to know where you are with regular expressions.
 
Richard Crist said:
Before we begin, how much experience in general do you have with regular expressions? There are many ways to approach your goal, and it will help to know where you are with regular expressions.

I would rate myself 1/10 for regularexpressions
10/10 for my learning skills

thank you
 
Based on your response

dev2dev said:
I would rate myself 1/10 for regularexpressions
10/10 for my learning skills

thank you

Based on your response I would say that you will have a good time learning about the possible regex solution to your goals. :)

There are many ways to approach this sort of thing, but all will involve assessment, and programming to make intelligent decisions as opposed to a convenient "replace all" procedure <OR> bring the file(s) into a text editor that supports regex and do multiple passes of substitution <OR> both. Basically, you will have to analyze the data and make decisions like whether a given expression you want to replace is safe to do so throughout the data, or if it must be done selectively, etc.

This is more of a solution approach discussion, applicable to several regex posts that I have seen. That is, many posts involve changing larger data streams or files using regex. Some have simple regex solutions, but most are like your post.

It's really too big to talk about with posts, but if you like you can contact me privately via private messaging or IM. Others may and probably should comment on this for a more complete idea of how to approach this. :cool:
 
Back
Top