melkanzi Posted July 22, 2007 Posted July 22, 2007 Hello, Im working on a site that requires me to divide the page(Main events page) into 3 parts. One part being a calender, a part to login and a part to show the events on the date selected. The login and calender are done. The user wants the events part to be displayed in a frame, just like this box im typing in with a scoller. I've put an IFrame object but what I cant do is add the events objects(usercontrols) to the page that the IFrame will display(events page) a different page from the Main events page. I want to be able to add the usercontrols into the events page dynamically so that the IFrame will show the events page. How can this be done?? Thanks alot. Quote
alreadyused Posted July 23, 2007 Posted July 23, 2007 what I cant do is add the events objects(usercontrols) to the page that the IFrame will display(events page) a different page from the Main events page. I want to be able to add the usercontrols into the events page dynamically so that the IFrame will show the events page. not sure i understand this right... is this correct: you have a form that you have divided into three sections (Main Form) you want to add controls to the Main Form to control the IFrame in the IFrame you're wanting to list the events, guessing manipulated by the controls on the main form? can you provide a code sample of what you're trying, and maybe a screenshot? Quote
Eduardo Lorenzo Posted July 24, 2007 Posted July 24, 2007 (edited) You are trying to add a separate page inside the iFrame? <iframe id="FrameID" src="YOUREVENTSPAGE>aspx" frameborder="0" width="100%" height="100%" runat="server"></iframe> should do the trick, just make sure the path is correct and set the Scrolling property to "auto" so you can have scrollbars. Edited July 24, 2007 by Eduardo Lorenzo Quote
melkanzi Posted July 24, 2007 Author Posted July 24, 2007 alreadyused, the usercontrols are created when the user clicks on a date on the calender on the Main form. I want to add these usercontrols onto the eventspage which will be displayed on the IFrame. Eduardo Lorenzo I know how to set the properties of the IFrame what I want is to add the usercontrols created on the main form onto the page that the IFrame will display Quote
MrPaul Posted July 24, 2007 Posted July 24, 2007 Pass querystring parameter The way I would approach this would be to have the framed page add the usercontrols itself, based on a querystring parameter which is set by the parent page. For example, in the parent page: myFrame.Attributes("src") = "ShowEvents.aspx?date=" + dateToDisplay.ToString() And in the framed page: Dim showDate As DateTime showDate = DateTime.Parse(Request.QueryString("date")) 'Add controls to page based on showDate Here the framed page can manage its own controls based on a parameter from the parent page. Good luck :cool: Quote Never trouble another for what you can do for yourself.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.