Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8205285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:10:41+00:00 2026-06-07T08:10:41+00:00

Below is my html table. In first table first tr first cell i have

  • 0

Below is my html table. In first table first tr first cell i have given csstdgreen to td.
and second cell have csstdgreen with rowspan 3.
I have to clear csstdgreen and rowspan and like to convert second table tr.
I have loop through table and check cell have csstdgreen and how many rowspan.
if cell have csstdgreen and rowspan then make first table like second table.
How i check css and rowspan in c# server side.I search google but not get.

//First Table
<table id="mytable" runat="server">
<tr class="csstablelisttd">
<td>09:00AM</td>
<td class="csstdgreen">00</td>
<td class="csstdgreen" rowspan="3">John</td>
</tr>
<tr class="csstablelisttd">
<td></td>
<td class="csstdgreen">15
</td>
</tr>
<tr class="csstablelisttd">
<td></td>
<td class="csstdgreen">15
</td>
</tr>
</table>

//Second Table
<table id="mytable" runat="server">
<tr class="csstablelisttd">
<td>09:00AM</td>
<td>00</td>
<td>John</td>
</tr>
<tr class="csstablelisttd">
<td></td>
<td>15
</td>
<td></td> 
</tr>
<tr class="csstablelisttd">
<td></td>
<td class="csstdgreen">15
</td>    
<td></td>    
</tr>    
</table>

//I m looping through table like this in server code.

  for(int i = 0; i <= mytable.Rows.Count - 1; i++)
        {
            for(int j = 0; j <= mytable.Rows.Count - 1; j++)
            {
    //error in if conditon object refrence not set to an instance of an object
        if(mytable.Rows[i].Cells[j].Attributes["csstdgreen"].Equals("csstdgreen"))
                {

                }
            }
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T08:10:43+00:00Added an answer on June 7, 2026 at 8:10 am

    to Remove CssCalss

    if(Cell1.Attributes["Class"].Equals("csstdgreen"))
     Cell1.Attributes.Remove("Class");
    

    To Add CssClass

    Cell1.Attributes.Add("Class","MyClass");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a HTML table like the below; <table style=width: 100%> <tr> <td style=width:
I have an html table like this below: name number contractid sebastian 01 aea123
Given the following html table and script shown below I am having a problem
I have an HTML table which is poulated by a user. The first colum
I have below html <table class=Newuser cellspacing=0 cellpadding=0 border=0 id=ctl00_ContentPlaceHolder2_CreateUserWizard1> <tr> <td> <table> <tr>
My HTML structure looks something like below: <div id=mainDiv> <table></table> <table></table> <table> <tr> <td
I have an html table followed by a button that says Add Row below
I have one HTML Table... This HTML table's first row is a static, when
Figured it out, solution below! I have an HTML table that is being populated
I want to add Excel button below the html table, that gives an Excel

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.