CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Threaded View

  1. #4
    Join Date
    Aug 2000
    Location
    Essex, Uk
    Posts
    1,214

    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
  •  





Click Here to Expand Forum to Full Width

Featured