trying to access an embedded html control within a web control

Discussion in 'ASP .Net Web Controls' started by Joe Stampf, Dec 15, 2003.

  1. Joe Stampf

    Joe Stampf Guest

    I'm a bit new to asp.net programming (although definitely not a dotnet
    rookie!) so I'm not sure if this is the right/best way to do this.

    I am building a webcontrol for a shopping cart app that accepts as a
    property some html to render, including at the very least a form textbox
    <input type=text>, and also an associated property that specifies the 'id'
    of that form textbox. (The web control is always inside an html form).
    The web control then renders the supplied html in its overridden
    'RenderContents' method.

    Now, the web control's html and form textbox show up fine in the client
    browser, but unfortunately I can not programmatically access the form
    textbox from the code behind, as with Page.findcontrol("xxx"), or any other
    way...

    I think this is because it is not explicitly added to any [child] controls
    collection (I was hoping it would get added automatically by the framework).

    Does anyone know how I can programmatically access this dynamically
    generated form textbox in the code behind? I am not sure I want to add it
    as a child control b/c --I think-- that would require *every* html tag to be
    hard-coded as nested child controls, thus losing the ability to just accept
    a custom html property string to render.

    Thanks for any help you pros can offer!
     
    Joe Stampf, Dec 15, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin Paul Gloster
    Replies:
    48
    Views:
    1,972
    Colin Paul Gloster
    Apr 10, 2007
  2. Replies:
    0
    Views:
    307
  3. =?Utf-8?B?UGF1bA==?=

    HTML Code embedded within HTML Page as Text

    =?Utf-8?B?UGF1bA==?=, Nov 7, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    458
    Mark Rae [MVP]
    Nov 7, 2007
  4. Thomas Dodds

    Databind an embedded control in an embedded datagrid

    Thomas Dodds, Jul 26, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    431
    Thomas Dodds
    Jul 26, 2004
  5. Trans
    Replies:
    11
    Views:
    336
    micathom
    Sep 5, 2007
Loading...

Share This Page