Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted
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?

Posted (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 by Eduardo Lorenzo
Posted

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

Posted

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:

Never trouble another for what you can do for yourself.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...