|
-
November 7th, 2008, 05:28 AM
#4
Re: Frustration With Dynamic Controls
The Literal Control adds another layer to your controls.
For instance if you swap these 2 lines:
Code:
tableReport.Rows(row).Cells(1).Controls.Add(New LiteralControl(" "))
tableReport.Rows(row).Cells(1).Controls.Add(assignedResource.cmdEdit)
the cmdEdit will become visible. The Literal control is masking the
assignedResource.cmdEdit.Attributes("Mode")
So with your new code:
assignedResource.XXXXXX.cmdEdit.Attributes("Mode") Where XXXXXX becomes the reference to LiteralControl.
If your still confused, right mouse click on your page (when run in browser) and View Source. Look for cmdEdit and it will show you how the ASP page has constructed cmdEdit for rendering, this will show you what to test for
Last edited by Bill Crawley; November 7th, 2008 at 05:35 AM.
Reason: More info
If you find my answers helpful, dont forget to rate me 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|