Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   trying to access an embedded html control within a web control (http://www.velocityreviews.com/forums/t772071-trying-to-access-an-embedded-html-control-within-a-web-control.html)

Joe Stampf 12-15-2003 07:31 PM

trying to access an embedded html control within a web control
 
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!




All times are GMT. The time now is 04:10 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.