How does my web user control know what page it is on?
In my web user control's code, I would like to be able to programatically access which URL it is called on.
For instance, lets say I have a web page, mypage.aspx and on it I call my control, myControl
mypage.aspx
-------------
<cc1:myControl Text = "Hi"></cc1:myControl>
Now in the code behind for myControl, how can I determine that the page the control is sitting on it mypage.aspx???
Re: How does my web user control know what page it is on?
Don't worry, figured it out... You have to use Context...
i.e
Context.Request.ServerVariables["URL"].ToString();