Click here to Skip to main content
15,905,558 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ebook link Pin
Paul Conrad26-Jan-08 6:30
professionalPaul Conrad26-Jan-08 6:30 
GeneralRe: ebook link Pin
John-ph26-Jan-08 19:39
John-ph26-Jan-08 19:39 
QuestionHow to show a web user control's properties in property window IF? Pin
maryam.saboor25-Jan-08 20:22
professionalmaryam.saboor25-Jan-08 20:22 
GeneralSending mails on particular date and time Pin
csn25-Jan-08 8:01
csn25-Jan-08 8:01 
GeneralRe: Sending mails on particular date and time Pin
Ennis Ray Lynch, Jr.25-Jan-08 9:24
Ennis Ray Lynch, Jr.25-Jan-08 9:24 
GeneralRe: Sending mails on particular date and time Pin
csn25-Jan-08 17:43
csn25-Jan-08 17:43 
GeneralRe: Sending mails on particular date and time Pin
John-ph26-Jan-08 19:44
John-ph26-Jan-08 19:44 
GeneralGetting the controls form an asp:Table [modified 2] Pin
Fernando A. Gomez F.25-Jan-08 7:18
Fernando A. Gomez F.25-Jan-08 7:18 
Hello all. So I have this asp:Table declared in the aspx file. But the rows are created dynamically in the Page_Load method, so I do something like:

for (some conditions here)
{
    TextBox txt = new TextBox();
    txt.ID = "someId";

    TableRow row = new TableRow();

    TableCell cell = new TableCell();
    cell.Controls.Add(txt);
    row.Cells.Add(cell);
    ...
    _table.Rows.Add(row);
}


and it renders the controls quite well. The problem is when I try to access the TextBox control. I tried something like:

TextBox txt = _table.Rows[0].Cells[0].FindControl("someId") as TextBox;


but FindControl is always returning null. I tried _table.Rows[0].FindControl("someId") and it gets nothing.

[Edit]
Ok, it seems that despite the rows being added and displayed, _table.Rows.Count has a zero value. This is kinda weird... Why would such property have a zero value? OMG | :OMG:
[/Edit]

[Edit 2]
I enabled the trace in the page and... the rows and cells are there... This is driving me insane... Sigh | :sigh:
[/Edit 2]

Any idea on what am I missing? Or how could I get such control?

Thanks in advance.


Stupidity is an International Association - Enrique Jardiel Poncela

modified on Friday, January 25, 2008 2:50:43 PM

GeneralRe: Getting the controls form an asp:Table Pin
ChrisKo25-Jan-08 8:19
ChrisKo25-Jan-08 8:19 
GeneralRe: Getting the controls form an asp:Table Pin
Fernando A. Gomez F.25-Jan-08 8:24
Fernando A. Gomez F.25-Jan-08 8:24 
GeneralRe: Getting the controls form an asp:Table Pin
ChrisKo25-Jan-08 9:24
ChrisKo25-Jan-08 9:24 
GeneralRe: Getting the controls form an asp:Table Pin
Fernando A. Gomez F.25-Jan-08 10:36
Fernando A. Gomez F.25-Jan-08 10:36 
GeneralRe: Getting the controls form an asp:Table Pin
Fernando A. Gomez F.25-Jan-08 11:23
Fernando A. Gomez F.25-Jan-08 11:23 
General[Message Deleted] Pin
PREMSONBABY25-Jan-08 4:06
PREMSONBABY25-Jan-08 4:06 
AnswerRe: Add-in issue while Loading Excel Files using ASP.net Pin
ToddHileHoffer25-Jan-08 4:19
ToddHileHoffer25-Jan-08 4:19 
GeneralWebService Pin
honeyss25-Jan-08 3:10
honeyss25-Jan-08 3:10 
AnswerRe: WebService Pin
ToddHileHoffer25-Jan-08 3:35
ToddHileHoffer25-Jan-08 3:35 
GeneralConfirm Box Pin
mehrdadc4825-Jan-08 2:10
mehrdadc4825-Jan-08 2:10 
GeneralRe: Confirm Box Pin
Vasudevan Deepak Kumar25-Jan-08 2:47
Vasudevan Deepak Kumar25-Jan-08 2:47 
AnswerRe: Confirm Box Pin
ToddHileHoffer25-Jan-08 3:33
ToddHileHoffer25-Jan-08 3:33 
GeneralRe: Confirm Box Pin
bhanu1234525-Jan-08 20:43
bhanu1234525-Jan-08 20:43 
QuestionScroll/navigate /focus datagrid to the row in which edit was clicked [modified] Pin
Sakshi Smriti25-Jan-08 1:22
Sakshi Smriti25-Jan-08 1:22 
GeneralDropdowlist using database wizard Pin
C#Coudou25-Jan-08 0:46
C#Coudou25-Jan-08 0:46 
GeneralActiveXObject + javascripting Pin
ritu432125-Jan-08 0:01
ritu432125-Jan-08 0:01 
GeneralRe: ActiveXObject + javascripting Pin
Venkatesh Mookkan25-Jan-08 0:16
Venkatesh Mookkan25-Jan-08 0:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.