Accessing Server.MapPath from within Custom Controls Render() method?

K

Kenneth Baltrinic

I am writing a simple custom control to read in an rtf file, convert it to
HTML and output the HTML. I ran into one little glitch. My control has a
FileName property, the value of which I want to convert from a relative path
to get the actual file path on the server. I need MapPath for this but I
don't have access to an HTTPServerUtility object (the class of object
returned by Page.Server) inside the Render method. Any suggestions?

--Ken Baltrinic
 
I

IgorW

Try this(Me in VB.NET).Page.Request....
HttpRequest.FilePath
or HttpRequest.Path
or HttpRequest.PhysicalPath




Am Wed, 15 Oct 2003 20:50:05 -0400 hat Kenneth Baltrinic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top