RepeatHost Business Hosting

TemplateField

How to localize a BoundField / TemplateField HeaderText

In order to localize a HeaderText property, you can use the common:

HeaderText='<%= MyResources.str_ResourceName1; %>'

Find a control in a TemplateField programmatically

When you add a DetailsView or GridView control to your page, you may need to programmatically access that control in the code behind. You might look at the System.Web.UI.Page object and see it has a FindControl (http://msdn2.microsoft.com/en-us/library/31hxzsdw.aspx) method built in for you. If you thought that you could get ANY control on the page...

You would be wrong.