I used to use a tool that you type in an HTML Code lik this one:
<div id="pnlLoggedIn" style="width:480px;">
<label for="txtUsername">Username</label>:
<input name="txtUsername" type="text" id="txtUsername" class="input_small" tabindex="1">
<label for="txtPassword">Password</label>:
<input name="txtPassword" type="password" id="txtPassword" class="input_small" tabindex="2">
<input type="submit" name="cmdLogin" value="Login" id="cmdLogin" class="red-button" tabindex="3" runat="server">
</div>
And it gives you this as output:
StringBuilder sb = new StringBuilder();
sb.AppendLine(" <div id=\"pnlLoggedIn\" style=\"width:480px;\">");
sb.AppendLine(" <label for=\"txtUsername\">Username</label>:");
sb.AppendLine(" <input name=\"txtUsername\" type=\"text\" id=\"txtUsername\" class=\"input_small\" tabindex=\"1\"> ");
sb.AppendLine(" ");
sb.AppendLine(" <label for=\"txtPassword\">Password</label>:");
sb.AppendLine(" <input name=\"txtPassword\" type=\"password\" id=\"txtPassword\" class=\"input_small\" tabindex=\"2\"> ");
sb.AppendLine(" ");
sb.AppendLine(" <input type=\"submit\" name=\"cmdLogin\" value=\"Login\" id=\"cmdLogin\" class=\"red-button\" tabindex=\"3\" runat=\"server\">");
sb.AppendLine(" </div>");
return sb.ToString();
I cant remember the name of the tool, i remember it was an online tool.
If someone knows a tool that does that can please write it here.
--UPDATE--
Here is the tool i created: C# HTML Builder