Possible Duplicate:
Better way to find control in ASP.NET
Hi,
Is there any way to refactor this:
placeholder1.Controls[0].Controls[0].Controls[0].Controls[0].Controls[1].Controls[1].Controls[1].ClientID.ToString();
Thanks
Possible Duplicate:
Better way to find control in ASP.NET
Hi,
Is there any way to refactor this:
placeholder1.Controls[0].Controls[0].Controls[0].Controls[0].Controls[1].Controls[1].Controls[1].ClientID.ToString();
Thanks
Are those controls created dynamically? If not, you can just specify the control you want by whatever you named it. WhatYouNamedIt.ClientID.ToString()