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




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

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

You can help support asp.net.ph