UserControl.Request Property
.NET Framework 2.0
Gets the HttpRequest object for the current Web request.
Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The following example uses the Request property to obtain the physical path of the user control. With an ID property set to myControl, the user control's location is obtained by a containing page or user control using the myControl.Request.Path syntax.
myControl.Response.Write("<br /><b>The server code is running on machine</b> : " + myControl.Server.MachineName); string actualServerPath = myControl.MapPath(myControl.Request.Path);
myControl.get_Response().Write("<br /><b>The server code is"
+ "running on machine</b> : "
+ myControl.get_Server().get_MachineName());
String actualServerPath =
myControl.MapPath(myControl.get_Request().get_Path());
Community Additions
ADD
Show: