Home > Ask the Microsoft .Net Development Experts > ASP.NET and Web Development Questions & Answers > Deleting dynamic table rows in .aspx Web forms
Ask The Win Development Expert: Questions & Answers
EMAIL THIS

Deleting dynamic table rows in .aspx Web forms

Daniel Cazzulino EXPERT RESPONSE FROM: Daniel Cazzulino

Pose a Question
Other Win Development Categories
Meet all Win Development Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 27 October 2004
I have created a dynamic table in an .aspx Web form with the first column having CheckBoxes in all rows. I would like to delete the row in which the CheckBox is checked when I click a button. How can I do it in ASP.NET?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
ASP.NET and Web Development
Top ASP.NET expert advice from Danny Cazzulino
Access VB .NET Windows control on client side
Drop down list server control creates error message
Take care with InitializeComponent
Calling via command prompt from ASP.NET
Screen capturing
How to retrieve the MAC address of a client using ASP.NET
How to sort a dropdown list in ASP.NET
Accessing session variables in different pages
Automatically closing a .exe

ASP.NET
Top ASP.NET expert advice from Danny Cazzulino
Access VB .NET Windows control on client side
Drop down list server control creates error message
How to retrieve the MAC address of a client using ASP.NET
How to sort a dropdown list in ASP.NET
Accessing session variables in different pages
Automatically closing a .exe
Accessing a control on an independent application
Checking input by character to verify validity
Referencing an old Crystal Reports version

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


By traversing the table rows and cells, you can get to the controls in the cell (i.e. table.Rows[0].Cells[0].Controls collection). You can get a reference to the checkbox and test for its checked property. If it's checked, you can delete the row just by removing it from the Rows collection on the table. If you have references to the checkboxes, you can go the other way around by using checkbox.Parent (which will give you the parent control, which will be the cell, and from there you can get to the row).




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Windows Development - White Papers, News and Expert Advice
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts