Need to create aspx web form dynamically
Hi I want to create the aspx web form dynamically like below,
<span class="form-element">
<label>
Employee Name</label>
<asp:TextBox ID="txtNameoftheContactPerson" runat="server" CssClass="required-entry validate-alpha-space"
onblur="return validateElem(this);" MaxLength="25" Style="text-transform: uppercase"></asp:TextBox>
</span><span class="form-element">
<label>
Gender</label>
<asp:RadioButton ID="rbtMale" runat="server" GroupName="gender" Text="Male" CssClass="radio-btn-lbl" />
<asp:RadioButton ID="rbtFemale" runat="server" Text="Female" GroupName="gender" CssClass="radio-btn-lbl" />
</span><span class="form-element">
<label>
Date of Joining<em>*</em></label>
<span class="input-img">
<asp:TextBox ID="txtArrangerdate" runat="server" CssClass="required-entry validate-date-au datepicker"
onblur="CheckFutureDate(this);"></asp:TextBox>
</span></span><span class="form-element">
<label>
Address1</label>
<asp:TextBox ID="txtAddress" runat="server" CssClass="last-element validate-address1"
onblur="return validateElem(this);" MaxLength="50"></asp:TextBox></span>
<span class="form-element">
<label>
State</label>
<asp:DropDownList ID="ddlState" runat="server">
</asp:DropDownList>
</span>
This is for sample.
Field list will be dynamically created based on the requirement.
Need to create the controls within span and and CSS.
Kindly do the needful.