Register Register Member Login Member Login Member Login Forgot Password ??
PHP Tutorial (Hypertext Preprocessor), ASP Tutorial (Active Server Pages), ASP.NET Tutorial (.Net 1.1,2.0,3.5)
   
   
  Registered : 70,253
   
 
HOME > ASP.NET > ASP.NET HTML Controls > ASP.NET HTMLTableCell
Search

ASP.NET HTMLTableCell

 
 
 
ASP.NET HTMLTableCell เป็นคอนโทรลใช้ในการสร้างคอลัมบ์ (HTMLTableCell) ในตาราง

Language Code : VB.NET || C#

ASP.NET HTMLTable

Framework : 1,2,3

Syntax

HtmlTableRow



HTMLTableCell.aspx

<%@ Page Language="VB" %>
<script runat="server">

    Sub Button1_OnClick(sender As Object, e As EventArgs)
			Dim numrows As Integer
            Dim numcells As Integer
            Dim i As Integer = 0
            Dim j As Integer = 0
            Dim Row As Integer = 0
            Dim r As HtmlTableRow
            Dim c As HtmlTableCell
        
            ' Generate rows and cells
            numrows = CInt(Select1.Value)
            numcells = CInt(Select2.Value)
            
            For j = 0 To numrows-1
            
                r = new HtmlTableRow()
                            
                If (row Mod 2 <> 0) Then
                    r.BgColor = "Gainsboro"
                End If
                row += 1
             
                For i = 0 To numcells-1
                    c = new HtmlTableCell()
                    c.Controls.Add(new LiteralControl("row " & j & ", cell " & i))
                    r.Cells.Add(c)
                Next i
                
                Table1.Rows.Add(r)
            Next j

    End Sub

</script>
<html>
<head>
</head>
<body>
    <form runat="server">
       Table rows:
        <select id="Select1" runat="server">
            <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>
        Table cells:
        <select id="Select2" runat="server">
            <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>
	  <input id="Button1" type="button" OnServerClick="Button1_OnClick" value="Button" runat="server" />
		<hr />
		<table id="Table1" CellPadding="5" CellSpacing="0" Border="1" runat="server" />
    </form>
</body>
</html>


Screenshot

ASP.NET HTML Form





ASP.NET WebMatrix - Control & Element

ASP.NET & Visual Studio .Net 2003 - Control & Element

ASP.NET & Visual Studio 2005,2008 - Control & Element




 

ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท

 
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rate :  
  Create/Update Date : 2008-10-27 07:08:18 / 2009-06-02 23:44:31
  View : 1,158
  Download : Download  ASP.NET HTMLTableCell
   
 
Sponsored Links
 
 
Ads Contact : 08-1987-6107
Download Mozilla Firefox
 
Ads Contact : 08-1987-6107
 Sponsored Links
ASP.NET HTML Control
Rate : View : 2,704
ASP.NET HTMLAnChor
Rate : View : 1,439
ASP.NET HTMLButton
Rate : View : 1,674
ASP.NET HTMLForm
Rate : View : 1,631
ASP.NET HTMLGeneric
Rate : View : 1,217
ASP.NET HTMLImage
Rate : View : 1,410
ASP.NET HTMLInputButton
Rate : View : 1,234
ASP.NET HTMLInputCheckBox
Rate : View : 1,246
ASP.NET HTMLInputFile
Rate : View : 1,297
ASP.NET HTMLInputHidden
Rate : View : 1,164
ASP.NET HTMLInputImage
Rate : View : 1,222
ASP.NET HTMLInputRadioButton
Rate : View : 1,185
ASP.NET HTMLInputText
Rate : View : 1,276
ASP.NET HTMLSelect
Rate : View : 1,297
ASP.NET HTMLTable
Rate : View : 1,406
ASP.NET HTMLTableRow
Rate : View : 1,131
ASP.NET HTMLTextArea
Rate : View : 1,243
ASP.NET HTMLSubmit
Rate : View : 1,264
 
 
© www.ThaiCreate.Com. 2003-2009 All Rights Reserved. My network : ThaiGoodWeb.Com , DVDmono.com
Comments & Suggestions Please Contact Us : thaicreate at hotmail dot com [Conditions Privacy Statement] ติดต่อโฆษณา 01-987-6107 อัตราราคา คลิกที่นี่