Page 67 - DCAP312_WEB_TECHNOLOGIES_II
P. 67

Unit 4: Advanced Server Controls



            The code for the content page shows the use of the HTML table element for layout.     Notes
                     <%@ Page Language= “C#” AutoEventWireup= “true”
                     CodeBehind= “Default.aspx.cs”
                     Inherits= “htmlserver._Default” %>
                     <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
                     “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
                     <html xmlns= “http://www.w3.org/1999/xhtml” >
                     <head runat= “server”>
                     <title>Untitled Page</title>
                     <style type= “text/css”>
                     style1
                     {
                     Width: 156px;
                     }
                     style2
                     {
                     Width: 332px;
                     }
                     </style>
                     </head>
                     <body>
                     <form id= “form1” runat= “server”>
                     <div>
                     <table style= “width: 54%;”>
                     <tr>
                     <td class= “style1”>Name :< /td>
                     <td class= “style2”>
                     <asp:TextBox ID= “txtname” runat=“server” Width= “230px”>
                     </asp:TextBox>
                     </td>
                     </tr>
                     <tr>
                     <td class= “style1”>Street</td>
                     <td class= “style2”>
                     <asp:TextBox ID= “txtstreet” runat= “server” Width= “230px”>
                     </asp:TextBox>
                     </td>
                     </tr>
                     <tr>
                     <td class= “style1”>City</td>
                     <td class= “style2”>




                                             LOVELY PROFESSIONAL UNIVERSITY                                    61
   62   63   64   65   66   67   68   69   70   71   72