asp.net.ph

Control.TemplateSourceDirectory Property

System.Web.UI Namespace   Control Class


Returns the virtual directory of the Page or UserControl that contains the current server control.

Syntax


Script Control.TemplateSourceDirectory

This property can only be used programmatically; it cannot be set when declaring the control.

Property Value

The virtual directory of the page or user control that contains the server control.

Example

The following example shows the simplest way to retrieve and display the TemplateSourceDirectory for the first control on the current Web page.

<%= Page.Controls [ 0 ].TemplateSourceDirectory %>

And which, for this page, returns the following:

/sys

See Also

Control Members   Page   UserControl Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note