Get properties of parent page at design time?

R

Rob Mayo

I developed a server control with a designer that mimics the actual output
of the control. The designer shows an image and a span (not server-side
components) I want to get the dimensions of the image at design time. I have
a routine that actually performs an http request to get the image provided,
read it to a stream, create an image from the stream, and reads the
dimensions thereof. It only works if I hardcode either the entire URL of the
image, or provide a base URI (the URI of the parent) and a relative URL from
that. This routine works at run time because
..Page.Request.ServerVariables("url") exists at run time.

The object is to get the URI of the parent page, so that I may pass it to
this routine during design time.

Does anyone have a way to do this? Like maybe there's some properties i can
access that will tell me what the server control is attached to.
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top