.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> Javascript >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

using style sheet creating table

Posted By:Athira Sreejith       Posted Date: February 05, 2009    Points: 10    Category: Javascript    URL: http://www.dotnetspark.com  
 

using style sheet creating . Below is the code to show how can you create table using Style sheet.The below sample code used Vb.NET as an example

Imports System.Data.OleDb
Imports System.Data
Imports System.Diagnostics
Imports System
Imports System.Web.UI.HtmlControls

----------------------------------------------------------------------------------------------------------------------------------------

Dim strtblanalyse is a string

 strtblAnalyse = "

"
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += " "
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""
            strtblAnalyse += ""


//While drcomname.Read

                strtblAnalyse += "

"
                strtblAnalyse += ""
                strtblAnalyse += ""
                strtblAnalyse += ""
                strtblAnalyse += ""
                strtblAnalyse += ""
                strtblAnalyse += ""
                strtblAnalyse += ""
                strtblAnalyse += ""
                strtblAnalyse += ""
                strtblAnalyse += ""
                strtblAnalyse += ""
                strtblAnalyse += ""
                strtblAnalyse += ""

//End While


            strtblAnalyse += "

Interested(" & Interested & ")Not Interested(" & NotInterested & ")Others(" & Others & ")
Send BrouchureSchedule
Company NameEmailFaxPostFollow up CallMeetingCall LaterCompetitionNo PlanDCMABusyVoice Mail
" & drcomname(14) & " " & drcomname(3) & " " & drcomname(4) & " " & drcomname(5) & " " & drcomname(6) & " " & drcomname(7) & " " & drcomname(8) & " " & drcomname(13) & " " & drcomname(9) & " " & drcomname(10) & " " & drcomname(11) & " " & drcomname(12) & "
"
            tblAnalyse.InnerHtml = strtblAnalyse

 

tblAnalyse is the name of the table in the design part.

 

---------------------------------------------------------------------------------------------------------------------------------------------

Cascading style sheet coding part

---------------------------------------------------------------------------------------------------------------------------------------------

We want to include the HTML part


  ReportManager
  
  
  
***IMPORTANT** http://localhost/Cms/includes/Style.css" type="text/css" rel="stylesheet">
  http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">

---------------------------------------------------------------------------------------------------------------------------------------------

.TextField1{
 font:  10pt   Arial, Helvetica, sans-serif;
 color: #000000;
 background-color: #ffffFF;
 text-align: left;
 border-width:1;
 border-color:#000011;
}

.TextField2{
 font:  10pt   Arial,  Helvetica, sans-serif;
 color: #000000;
 background-color: #ffffFF;
 text-align: left;
 border-width:1;
 border-color:#000011;
}

.TextField3{
 font:  10pt   Arial,  Helvetica, sans-serif;
 color: #000000;
 background-color: #ffffFF;
 text-align: left;
 border-width:1;
 border-color:#000011;
}

.TextField4{
 font:  10pt   Arial,  Helvetica, sans-serif;
 color: #000000;
 background-color: #ffffFF;
 text-align: left;
 border-width:1;
 border-color:#000011;
}

.TextField5{
 font:  10pt   Arial,  Helvetica, sans-serif;
 color: #000000;
 background-color: #ffffFF;
 text-align: left;
 border-width:1;
 border-color:#000011;
}

.TextField6{
 font:  10pt   Arial,  Helvetica, sans-serif;
 color: #000000;
 background-color: #ffffFF;
 text-align: left;
 border-width:1;
 border-color:#000011;
}

.TextField7{
 font:  10pt   Arial,  Helvetica, sans-serif;
 color: #000000;
 background-color: #ffffFF;
 text-align: left;
 border-width:1;
 border-color:#000011;
}

.button{
 font:  10pt   Arial,  Helvetica, sans-serif;
 color: #000000;
 background-color: #ffffFF;
 text-align: center;
 border-width:1;
 border-color:#000011;
}

.TabHead {
 font: bold 10pt  Helvetica, Arial,  sans-serif;
 color: #F5FDFF;
 background-color: #74a5de;
 text-indent: 15px;
}

.TabFooter{
 font:  6pt  Helvetica, Arial,  sans-serif;
 color: #F5FDFF;
 background-color: #74a5de;
 text-indent: 10px;
}

.TabpopBody {
 font : bold 10pt  Helvetica, Arial,  sans-serif;
 color: #004D65;
 background-color: #ffffff;
 text-align: right
 border-width:thin;
}


.TextStyle
{

 border  : solid thin #60A6BF; 
 font  : 10pt Helvetica, Arial,  sans-serif;
 color  : #ffffff; 
}

.Header

 font : bold 11pt  Tahoma, Arial,  sans-serif;
 color: #003366;
}

.Header1

 font : bold  10pt  Tahoma, Arial,  sans-serif;
 color: #000000;
 background-color: #E8FAFF;
 decoration-underline;
 text-decoration: underline;
 
}

.FieldLabel2
{
 font: 10pt  Arial, Tahoma, Helvetica,  sans-serif;
 color: #003366;
 text-indent: 15px;
 background-color: #D5e6f9;
}


.FieldLabel3

 font : 10pt  Verdana, Tahoma, Helvetica, Arial,  sans-serif;
 color: #003366;
 background-color: #D5e6f9;
 text-indent: 15px;
 border-right: solid thin #ffffff;
}

.headme

 font : bold 10pt  Helvetica, Arial,  sans-serif;
 color: #004D65;
 background-color: #F5FDFF;
 text-indent: 15px;
 border-right: solid thin #ffffff;
}


.TableStyle
{
 border-left : solid thin #60A6BF;
 border-right : solid thin #60A6BF;
 border-bottom : solid thin #60A6BF;
 color  : #004D65;
}

.TextStyle
{

 border  : solid thin #60A6BF; 
 font  : 10pt Arial, Helvetica, Sans-Serif;
 color  : #ffffff; 
}

.content
{
 font:  10pt   Arial, Helvetica, sans-serif;
 color: #000000;
 background-color: #ffffFF;
 text-align: left;
 border-width:1;
 border-color:#000011;
}

.Userlist
{
 background-color: #0381AA;
}

.footer
{
 font-size: 11px;
 color: dimgray;
 font-family: Verdana, Tahoma, Arial;
}
.textbox
{
 font-size: 13px;
 color: #330099;
 font-family: Verdana, Tahoma;
}
.thead
{
 font-weight: bold;
 font-size: 13px;
 color: white;
 font-family: Verdana, Tahoma;
 background-color: thistle;
}
.rowodd
{
 font-weight: bold;
 font-size: 12px;
 color: midnightblue;
 font-family: Verdana, Tahoma;
 background-color: lavender;
}

.roweven
{
 font-weight: bold;
 font-size: 12px;
 color: midnightblue;
 font-family: Verdana, Tahoma;
 background-color: ghostwhite;
}
.butt
{
 font-weight: bold;
 font-size: 13px;
 color: #ffffff;
 font-family: Verdana, Tahoma;
 background-color: #003366;
}
.link
{
 border-right: silver groove;
 border-top: silver groove;
 font-weight: bold;
 font-size: 13px;
 border-left: silver groove;
 cursor: hand;
 color: #E8FAFF;
 border-bottom: silver groove;
 font-family: Tahoma, Verdana;
 background-color: #0381AA;
}

.linkover
{
 border-right: silver groove;
 border-top: silver groove;
 font-weight: bold;
 font-size: 13px;
 border-left: silver groove;
 cursor: hand;
 color: #0381AA;
 border-bottom: silver groove;
 font-family: Tahoma, Verdana;
 background-color: #E8FAFF;
}
SELECT
{
 border-right: black thin solid;
 border-top: black thin solid;
 border-left: black thin solid;
 border-bottom: black thin solid;
 color: #003366;
 font-family: Verdana, Tahoma;
}
INPUT
{
 border-right: black 1px solid;
 border-top: black 1px solid;
 border-left: black 1px solid;
 color: #003366;
 border-bottom: black 1px solid;
 font-family: Verdana, Tahoma;
}
.root
{
 border-right: #003366 1px solid;
 border-top: #003366 1px solid;
 border-left: #003366 1px solid;
 color: #003366;
 border-bottom: #003366 1px solid;
 font-family: Verdana, Tahoma;
 background-color: #DDEfF8;
}

.tabBorder
{
 border-right: #003366 thin ridge;
 border-top: #003366 thin ridge;
 border-left: #003366 thin ridge;
 border-bottom: #003366 thin ridge;
 
}

.imgButt
{
 border-right: 0px solid;
 border-top: 0px solid;
 border-left: 0px solid;
 border-bottom: 0px solid;
}
.hover
{
 cursor: hand;
}
.login
{
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 10px;
 font-weight: normal;
 color: #000000;
 text-decoration: none;
}

.GraphTitle1
{
 font-family: Tahoma, "Futura Md";
 font-size: 11px;
 color: #ffffff;
 background-color: "#ffff33";
 font-weight: bold;
 text-align:center;
 text-indent:3px;
}
.GraphTitle
{
 font-family: Tahoma, "Futura Md";
 font-size: 11px;
 color: #ffffff;
 background-color: #0099FF;
 font-weight: bold;
 text-align:center;
 text-indent:3px;
}
.GraphTitleProduct
{
 font-family: Tahoma, "Futura Md";
 font-size: 11px;
 color: #000000;
 background-color: #CEFFFF;
 font-weight: bold;
 text-align:left;
 text-indent:3px;
}
.GraphTitleSales
{
 font-family: Tahoma, "Futura Md";
 font-size: 12px;
 color: #ffffff;
 border-color:White; 
 background-color: 73A6DE;
 font-weight: bold;
 text-align:center;
 text-indent:3px;
}

.GraphTitleLeads
{
 font-family: Tahoma, "Futura Md";
 font-size: 12px;
 color: 002863;
 border-color :White; 
 background-color: D6E7FF;
 font-weight: bold;
 text-align:center;
 text-indent:3px;
}


.GraphTitleMeetings
{
 font-family: Tahoma, "Futura Md";
 font-size:10.5px;
 color: #000000;
 background-color: #ffffce;
 font-weight: bold; 
 text-align:center;
 text-indent:3px;
 }

.GraphTitleMain
{
 font-family: Tahoma, "Futura Md";
 font-size: 12px;
 color: #ffffff;
 background-color: #0099FF;
 font-weight: bold;
 text-align:center;
 text-indent:3px;
}

.GraphRadSow
{
 font-family: Tahoma, "Futura Md";
 font-size: 9px;
 color: #ffffff;
 background-color: #0099FF;
 font-weight:bold;
 text-align:center;
 text-indent:3px;
}
.GraphRadSow1
{
 font-family: Tahoma, "Futura Md";
 font-size: 9px;
 color: #000000;
 background-color: #ffff33;
 font-weight:bold;
 text-align:center;
 text-indent:3px;
}
.CriteriaTxt
{
 font-family: Tahoma, "Futura Md";
 font-size: 11px;
 color: #000000;
 background-color: #ffffff;
 text-align:left;
 text-indent:3px;
 border: none;
}

.GraphTxt
{
 font-family: Tahoma, "Futura Md";
 font-size: 11px;
 color: #000000;
 background-color: #CEFFFF;
 text-align:left;
 text-indent:3px;
 border:1; 
}
.GraphTxtSales
{
 font-family: Tahoma, "Futura Md";
 font-size: 11px;
 color: #000000;
 background-color: #CEFFFF;
 text-align:center;
 text-indent:3px;
 border:true;
}

.GraphTxtLeads
{
 font-family: Tahoma, "Futura Md";
 font-size: 11px;
 color: #000000;
 background-color: #00cfff;
 text-align:center;
 text-indent:3px;
 border:true;
}

.GraphTxtMeetings
{
 font-family: Tahoma, "Futura Md";
 font-size: 11px;
 color: #000000;
 background-color: #ffffce ;
 text-align:center;
 text-indent:3px;
 border:true;
 
}


.GraphTxt1
{
 font-family: Tahoma, "Futura Md";
 font-size: 10px;
 color: #000000;
 background-color: #00CFFF;
 font-weight: bold;
 text-align:left;
 text-indent:3px;
 border: none;
}
.GraphTxt11
{
 font-family: Tahoma, "Futura Md";
 font-size: 11px;
 color: #ffffff;
 background-color: #00CFFF;
 font-weight: bold;
 text-align:left;
 text-indent:3px;
 border: none;
}
.GraphTxt2
{
 font-family: Tahoma, "Futura Md";
 font-size: 11px;
 color: #000000;
 background-color: #FFFFCE;
 text-align:left;
 text-indent:3px;
 border: none;
}
.GraphTxt3
{
 font-family: Tahoma, "Futura Md";
 font-size: 10px;
 color: #000000;
 background-color: #FFFF9C;
 font-weight: bold;
 text-align:left;
 text-indent:3px;
 border: none;
}
.GraphTxt4
{
 font-family: Tahoma, "Futura Md";
 font-size: 11px;
 color: #000000;
 background-color: #FF9ACE;
 text-align:left;
 text-indent:3px;
 border: none;
}
.GraphTxt5
{
 font-family: Tahoma, "Futura Md";
 font-size: 10px;
 color: #000000;
 background-color: #FF00FF;
 font-weight: bold;
 text-align:left;
 text-indent:3px;
 border: none;
}
.GraphTxt6
{
 font-family: Tahoma, "Futura Md";
 font-size: 10px;
 color: #000000;
 background-color: #FF9A31;
 font-weight: bold;
 text-align:left;
 text-indent:3px;
 border: none;
}



     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend