R
Robert Warnestam
{This message was original posted in
microsoft.public.dotnet.framework.aspnet.buildingcontrols but was somehow
not delivered}
Hi,
I've problems with a custom WebControl. The control has properties for
letting the user set the relative path to some images and a xml file that
the controls need. In runtime the images are displayed and the control can
load the xml file. In design time however, this fails because the current
path in Windows depends on previous actions. The solution would be to use
MapPath, but in design time this cant be done.
// FileName is the path to be used when loading xml file or displaying
images
// UserFile is the relaitve path that is a property of the control
if (Context == null ) {
// We are in design time - I don't know what to do here
FileName = UserFile // ??????????????
} else {
FileName = HttpContext.Current.Server.MapPath( UserFile )
}
Any help would be much appreciated.
Robert Warnestam
microsoft.public.dotnet.framework.aspnet.buildingcontrols but was somehow
not delivered}
Hi,
I've problems with a custom WebControl. The control has properties for
letting the user set the relative path to some images and a xml file that
the controls need. In runtime the images are displayed and the control can
load the xml file. In design time however, this fails because the current
path in Windows depends on previous actions. The solution would be to use
MapPath, but in design time this cant be done.
// FileName is the path to be used when loading xml file or displaying
images
// UserFile is the relaitve path that is a property of the control
if (Context == null ) {
// We are in design time - I don't know what to do here
FileName = UserFile // ??????????????
} else {
FileName = HttpContext.Current.Server.MapPath( UserFile )
}
Any help would be much appreciated.
Robert Warnestam