HtmlTable.Align プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HtmlTable.Align プロパティの意味・解説 

HtmlTable.Align プロパティ

Web ページ上のほかの要素基準として HtmlTable コントロール配置取得または設定します

名前空間: System.Web.UI.HtmlControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

解説解説
使用例使用例

Align プロパティ使用してWeb ページ上の他の要素基準として HtmlTable コントロール配置指定する方法次のコード例示します

<%@ Page Language="VB" AutoEventWireup="True"
 %>

<script runat="server">

  Sub Button_Click(ByVal sender As
 Object, ByVal e As EventArgs)

    ' Set the HtmlTable properties according to the
    ' user selections.
    Table1.CellSpacing = CInt(SpacingSelect.Value)
    Table1.CellPadding = CInt(PaddingSelect.Value)
    Table1.Align = AlignSelect.Value

  End Sub

</script>

<html>
<head>
   <title>HtmlTable Example</title>
</head>
<body>

   <form runat="server">

      <h3>HtmlTable Example</h3>

      <table id="Table1" 
             Border="1" 
             BorderColor="black" 
             runat="server">

         <tr>
            <th>
               Column 1
            </th>
            <th>
               Column 2
            </th>
            <th>
               Column 3
            </th>
         </tr>
         <tr>
            <td>
               Cell 1
            </td>
            <td>
               Cell 2
            </td>
            <td>
               Cell 3
            </td>
         </tr>
         <tr>
            <td>
               Cell 4
            </td>
            <td>
               Cell 5
            </td>
            <td>
               Cell 6
            </td>
         </tr>

      </table>
      
      <br><br><br><br><br><br><br><br>
      
      <hr>

      Select the display settings: <br><br>

      Align:
      <select id="AlignSelect" 
              runat="server">

         <option Value="Left">Left</option>
         <option Value="Center">Center</option>
         <option Value="Right">Right</option>
        
      </select>

      &nbsp;&nbsp;

      CellPadding:
      <select id="PaddingSelect" 
              runat="server">

         <option Value="0">0</option>
         <option Value="1">1</option>
         <option Value="2">2</option>
         <option Value="3">3</option>
         <option Value="4">4</option>
         <option Value="5">5</option>

      </select>

      &nbsp;&nbsp;

      CellSpacing:
      <select id="SpacingSelect" 
              runat="server">

         <option Value="0">0</option>
         <option Value="1">1</option>
         <option Value="2">2</option>
         <option Value="3">3</option>
         <option Value="4">4</option>
         <option Value="5">5</option>

      </select>
       
      <br><br>
  
      <input type="button" 
             value="Generate Table"
             OnServerClick ="Button_Click" 
             runat="server"/>

   </form>

</body>
</html>
<%@ Page Language="C#" AutoEventWireup="True" %>

<script runat="server">

  void Button_Click(Object sender, EventArgs e)
  {

    // Set the HtmlTable properties according to the
    // user selections.
    Table1.CellSpacing = Convert.ToInt32(SpacingSelect.Value);
    Table1.CellPadding = Convert.ToInt32(PaddingSelect.Value);
    Table1.Align = AlignSelect.Value;

  }

</script>

<html>
<head>
   <title>HtmlTable Example</title>
</head>
<body>

   <form runat="server">

      <h3>HtmlTable Example</h3>

      <table id="Table1" 
             Border="1" 
             BorderColor="black" 
             runat="server">

         <tr>
            <th>
               Column 1
            </th>
            <th>
               Column 2
            </th>
            <th>
               Column 3
            </th>
         </tr>
         <tr>
            <td>
               Cell 1
            </td>
            <td>
               Cell 2
            </td>
            <td>
               Cell 3
            </td>
         </tr>
         <tr>
            <td>
               Cell 4
            </td>
            <td>
               Cell 5
            </td>
            <td>
               Cell 6
            </td>
         </tr>

      </table>
      
      <br><br><br><br><br><br><br><br>
      
      <hr>

      Select the display settings: <br><br>

      Align:
      <select id="AlignSelect" 
              runat="server">

         <option Value="Left">Left</option>
         <option Value="Center">Center</option>
         <option Value="Right">Right</option>
        
      </select>

      &nbsp;&nbsp;

      CellPadding:
      <select id="PaddingSelect" 
              runat="server">

         <option Value="0">0</option>
         <option Value="1">1</option>
         <option Value="2">2</option>
         <option Value="3">3</option>
         <option Value="4">4</option>
         <option Value="5">5</option>

      </select>

      &nbsp;&nbsp;

      CellSpacing:
      <select id="SpacingSelect" 
              runat="server">

         <option Value="0">0</option>
         <option Value="1">1</option>
         <option Value="2">2</option>
         <option Value="3">3</option>
         <option Value="4">4</option>
         <option Value="5">5</option>

      </select>
       
      <br><br>
  
      <input type="button" 
             value="Generate Table"
             OnServerClick ="Button_Click" 
             runat="server"/>

   </form>

</body>
</html>
<%@ Page Language="JScript" AutoEventWireup="True" %>

<script runat="server">

  function Button_Click(sender : Object, e : EventArgs) 
  {

    // Set the HtmlTable properties according to the
    // user selections.
    Table1.CellSpacing = Convert.ToInt32(SpacingSelect.Value);
    Table1.CellPadding = Convert.ToInt32(PaddingSelect.Value);
    Table1.Align = AlignSelect.Value;

  }

</script>

<html>
<head>
   <title>HtmlTable Example</title>
</head>
<body>

   <form runat="server">

      <h3>HtmlTable Example</h3>

      <table id="Table1" 
             Border="1" 
             BorderColor="black" 
             runat="server">

         <tr>
            <th>
               Column 1
            </th>
            <th>
               Column 2
            </th>
            <th>
               Column 3
            </th>
         </tr>
         <tr>
            <td>
               Cell 1
            </td>
            <td>
               Cell 2
            </td>
            <td>
               Cell 3
            </td>
         </tr>
         <tr>
            <td>
               Cell 4
            </td>
            <td>
               Cell 5
            </td>
            <td>
               Cell 6
            </td>
         </tr>

      </table>
      
      <br><br><br><br><br><br><br><br>
      
      <hr>

      Select the display settings: <br><br>

      Align:
      <select id="AlignSelect" 
              runat="server">

         <option Value="Left">Left</option>
         <option Value="Center">Center</option>
         <option Value="Right">Right</option>
        
      </select>

      &nbsp;&nbsp;

      CellPadding:
      <select id="PaddingSelect" 
              runat="server">

         <option Value="0">0</option>
         <option Value="1">1</option>
         <option Value="2">2</option>
         <option Value="3">3</option>
         <option Value="4">4</option>
         <option Value="5">5</option>

      </select>

      &nbsp;&nbsp;

      CellSpacing:
      <select id="SpacingSelect" 
              runat="server">

         <option Value="0">0</option>
         <option Value="1">1</option>
         <option Value="2">2</option>
         <option Value="3">3</option>
         <option Value="4">4</option>
         <option Value="5">5</option>

      </select>
       
      <br><br>
  
      <input type="button" 
             value="Generate Table"
             OnServerClick ="Button_Click" 
             runat="server"/>

   </form>

</body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HtmlTable クラス
HtmlTable メンバ
System.Web.UI.HtmlControls 名前空間
CellSpacing
CellPadding
HtmlTableCell
HtmlTableCell.Align
HtmlTableCell.VAlign
HtmlTableRow
HtmlTableRow.Align
HtmlTableRow.VAlign
その他の技術情報
HTML サーバー コントロール


このページでは「.NET Framework クラス ライブラリ リファレンス」からHtmlTable.Align プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からHtmlTable.Align プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からHtmlTable.Align プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「HtmlTable.Align プロパティ」の関連用語

HtmlTable.Align プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



HtmlTable.Align プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS