CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 2/13/2004 11:03:11 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 6 Views: 57 Favorited: 0 Favorite
7 Items, 1 Pages 1 |< << Go >> >|
paulhayman
Asp.Net User
Server Visible Controls inside a Template Container??2/13/2004 11:03:11 AM

0


I've written a simple Server Control in VB that uses TemplateContainer.


<uc1:WebUserControl1 id="WebUserControl11" runat="server">
<MainContent>
This is a test
</MainContent>
<RightContent>
<asp:TextBox ID=test1 Runat=server />
</RightContent>
</uc1:WebUserControl1>


I'd like to be able to access the asp:TextBox held within the RightContent template.

I've tried using test1 = WebUserControl11.FindControl("test1") to get at the control but it always returns nothing.

Has anyone out there run in to this problem?

Paul Hayman MCSD
master4eva
Asp.Net User
Re: Server Visible Controls inside a Template Container??2/13/2004 2:36:58 PM

0

When and where are you searching for the textbox control?
-- Justin Lovell
paulhayman
Asp.Net User
Re: Server Visible Controls inside a Template Container??2/13/2004 7:42:17 PM

0


I'm trying to access the TextBox control from the codebehind of the page containing the templated control.

Paul ;-)
Paul Hayman MCSD
master4eva
Asp.Net User
Re: Server Visible Controls inside a Template Container??2/14/2004 5:47:14 AM

0

Ok, you answered where but not when :-) . Which part of the life cycle?

* Init
* Load
* PreRender
-- Justin Lovell
paulhayman
Asp.Net User
Re: Server Visible Controls inside a Template Container??2/16/2004 10:01:32 AM

0

in the Page_Load of the page containing the control.
Paul Hayman MCSD
master4eva
Asp.Net User
Re: Server Visible Controls inside a Template Container??2/16/2004 1:41:08 PM

0

Ok, to make things short and sweet: during which event did you add the template controls into the actual control tree? (I am guessing that it is in the PreRender).

That is the problem... definitely: what is happening is that you are searching for a control that has not been added to the control tree yet. Hope that this can shed some light onto your error.
-- Justin Lovell
paulhayman
Asp.Net User
Re: Server Visible Controls inside a Template Container??2/16/2004 2:08:34 PM

0


ahh... I understand what you're saying... I'll check in to it

Paul

Paul Hayman MCSD
7 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET 2.0 Website programming: problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Beginning C# databases: from novice to professional Authors: James Huddleston, Ranga Raghuram, Scott Allen, Syed Fahad Gilani, Jacob Hammer Pedersen, Jon Reid, Pages: 622, Published: 2004
ASP.NET: Your Visual Blueprint for Creating Web Applications on the .Net Framework Authors: Danny Ryan, Thomas Ryan, Tommy Ryan, Pages: 320, Published: 2001
Sams teach yourself ASP.NET in 21 days Authors: Chris Payne, Pages: 1077, Published: 2002
Windows Server 2003 security infrastructures Authors: Jan de Clercq, Pages: 756, Published: 2004

Web:
Using FindControl with control nested inside Header Template of ... You cannot do a FindControl on a template control. ... DataRow)Container. DataItem)["Compar_Grp_Id"]),Convert.ToBoolean(((System.Data.DataRow)Container. ... ...
ListView Web Server Control Overview The DataPager control can be inside the LayoutTemplate template or on ... template, you can reference the DataPager control by using the Container property. ...
Dynamic Templates for the Repeater, DataList and DataGrid Controls ost of the time, when you add a Repeater, DataList or DataGrid control on the page, ... A possible solution is to bind the Visible property of the control declared inside the template to a function ... Setting pager template Help me with ajax...code is inside! [Archive] - CodingForums.com acc.Visible = true; DataSet ds = new DataSet(); ds.ReadXml(Server. ... _barPic = template; } public void InstantiateIn(Control container) ...

directorysearcher filter fails on remote server - ng.asp-net-forum ... trying to create my first server side control and need help · server visible controls inside a template container?? loading .ascx twice make me slow ...
AnimationExtender within a datalist - asp.net_ajax.asp ... ..... also found in the AJAX Control Toolkit, to the DataList's Item Template. ...
TypeConverter - enum to string - ng.asp-net-forum.windows ... custom control wont expose child controls · server visible controls inside a template container?? composite control containing listbox, bgcolor problem ...






help required - unable to cast object of type 'system.web.compilation.buildresultcompiledassembly' to type 'system.web.util.itypedwebobjectfactory'

cannot see the add deployment project under build menu after installing

how do you deploy a project (website)

web deployment projects - inadequate documentation - need help

web deployment project and web application project

how should i publish a web deployment project?

web deployment project won't compile when doing a web.config file section replacement on a custom section

problem with website publishing

how to automate creating\updating web references during build process

updating a deployed windows application

loosing references when i switch to release

troubles with web site project and class library with resources

cannot find system.web section

new version of ilmerge, what about aspnet_merge?

why can't i deploy a web site to localhost using the same name as the project name

merged dlls not being deleted after-the-fact

replacing custom sections of a web.config

web deployment project - "cannot use a leading .. to exit above the top directory"

wdp - output files

how can i access a dynamically created upload ctrl through javascript in default.aspx.cs file?

aspnet_merge report object reference not set to...

deployment restartwwwservice and removepreviousversions properties not working

running jsmin automatically?

config replacements on debug - help needed

deploying a web project without overlaying local web.config

web deployment

custom task assembly not being released after build

is webdeploymentproject needed anymore?

having wdp in vs2008!

deploy web site to dedicated server and set up sql management studio, aspnetdb.mdf

   
  Privacy | Contact Us
All Times Are GMT