Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Getting a reference to a control in a datalist's headertemplate.


Message #1 by "Brandon Levitt" <levittbr@m...> on Thu, 23 Aug 2001 23:36:22
I want to programmatically change the title (header) of a datalist.
I was able to get a reference to the control with:
((Label)DataList1.Controls[0].FindControl("Label1")).Text = "New Header";

My question is, can I assume that Conrols[0] will always reference the 
header?  If not is there a better way to get a reference to the controls 
in the header?

Thanks

  Return to Index