I want to traverse a 3 column table to get the 3rd column's textbox data. The first 2 cell's have text assigned to the cell (cell.text="xyz"). When I run this, column 2 cell's text is read with no problem: for(int i=1; i<=TasksTable.Rows.Count-1; i++) { string txtColumn2 = TasksTable.Rows[i].Cells[1].Text; } However I get error message when I try to use FindControl or do something like: for(int i=1; i<=TasksTable.Rows.Count-1; i++) { // Or like.. txtColumn3 = TasksTable.Rows[i].Cells[2].Text; TextBox txtColumn3 = (TextBox)TasksTable.Rows[i].Cells[2].FindControl ("Hours"); } Your syntax help would be appreciated. Thanks in advance if you don't hear from me, Jim.:confused:
jmelgar
Posts
-
How to extract a table cell's textbox data? -
How to programmatically cause a button click?I have a web form and would like to cause a button to be clicked under a certain condition. How do I (what's the syntax) programmatically cause a button click so that the user doesn't have to do it? :omg: Thanks all, in advance, for your reply!
-
How to force HTML <td> to display on new lines rather than across the page on one line?:confused:My HTML source output in NotePad prints entirely on one line: 1234 How could I use the \r\n or something similar to create line breaks (c#.net), thereby making my output easier to debug? That is I want each to appear on a new line. I tried using
, but that still prints on the same line all the way across. Thanks in advance! -
How to pass multiple field values from a datagrid hyperlink?:confused:I'm using a datagrid with a hyperlink column displaying each person's name as the link. When the name is clicked, I'd like to pass the name and other field values (i.e. SSN, phone), contained in the datagrid, as a query string. However, the DataNavigateUrlField only let's me enter one field value. Any ideas how I could pass more than one field value (as a query string) by clicking a hyperlink in a datagrid? Thanks all.