views:

35

answers:

0

I am planning to rebuilding the code of one asp.net project to another asp.net project.

but i am stuck some where ...

i drag and dropped the master page and the views (4 nos) into the master page.

Now i need to recode what is there in the view using designer

Shown below the code inside the first view. How i could recreate it using the form?

   <asp:View runat="server" ID="view_0">
                <form id="frmView0" defaultbutton="btn_View0_Next">
                <h1 class="blue">
                    <asp:Label ID="lbl_viewTitle0" runat="server" Text="Label"></asp:Label>
                </h1>
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr>
                        <td width="150">
                            <asp:Label ID="lbl_view0_firstName" runat="server" Text="Firstname"></asp:Label>
                        </td>
                        <td width="200"><asp:TextBox ID="txt_firstName" runat="server" AutoCompleteType="FirstName" TabIndex="1"></asp:TextBox>
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="Validator_FirstName" runat="server" ControlToValidate="txt_firstName"
                                ErrorMessage="* Required field" ValidationGroup="Form1"></asp:RequiredFieldValidator>

                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lbl_view0_surname" runat="server" Text="Surname"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtSurName" runat="server" AutoCompleteType="LastName" TabIndex="3"></asp:TextBox>
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="Validator_Surname" runat="server" ControlToValidate="txtSurName"
                                ErrorMessage="* Required field" ValidationGroup="Form1"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lbl_view0_ContactNum" runat="server" Text="Contact number"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txt_contactNum" runat="server" AutoCompleteType="BusinessPhone"
                                TabIndex="3"></asp:TextBox>
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="Validator_ContactNumber" runat="server" ControlToValidate="txt_contactNum"
                                ErrorMessage="* Required field" ValidationGroup="Form1"></asp:RequiredFieldValidator>

                            <asp:RangeValidator ID="RangeValidator2" runat="server" 
                                ControlToValidate="txt_contactNum" ErrorMessage="Enter a numeric value" 
                                MaximumValue="99999999999999" MinimumValue="0"></asp:RangeValidator>

                        </td>
                    </tr>
                </table>
                <hr class="blue" />
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr>
                        <td width="150">
                            <asp:Label ID="lbl_view0_typeOfRequest" runat="server" Text="Type of request:"></asp:Label>
                        </td>
                        <td width="500"><asp:DropDownList ID="ddl_view0_typeOfRequest" runat="server" TabIndex="4">
                                <asp:ListItem Value="-1">Please select...</asp:ListItem>
                                <asp:ListItem>New</asp:ListItem>
                                <asp:ListItem>Update</asp:ListItem>
                                <asp:ListItem>Delete</asp:ListItem>
                            </asp:DropDownList>
                            <span id="span_ddl_view0_typeOfRequest" class="errorText"></span>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lbl_view0_workUnitLevel" runat="server" Text="Work unit level:"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddl_view0_workUnitLevel" runat="server" TabIndex="5">
                                <asp:ListItem Selected="True" Value="-1">Please select...</asp:ListItem>
                                <asp:ListItem Value="1">Head office</asp:ListItem>
                                <asp:ListItem Value="2">Region</asp:ListItem>
                                <asp:ListItem Value="3">Store</asp:ListItem>
                                <asp:ListItem Value="0">Area</asp:ListItem>
                            </asp:DropDownList>
                            <span id="span_ddl_view0_workUnitLevel" class="errorText"></span>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
                <br />
                <hr />
                <asp:Button ID="btn_View0_Next" runat="server" Text="Next" ValidationGroup="Form1" OnClientClick="return ValidateDropDown();"/>
                <br />
                </form>
            </asp:View>

Where i will get the form tag from the designer??