Web Forms :: Content Placeholder Hosting Silverlight Size?

Mar 11, 2011

(vs2010 sl4 vb.net)

When I create a default silverlight application in VS2010, I get a silverlight user control and a web site that hosts it. The object tag in the apsx page that hosts the silverlight object has its width and height set to 100%. The silverlight user control takes up all the broswer window and it also grows and shrinks properly as the browser is resized. Perfect.

If I add a master page and child page, in the child page I copy the object tag, still set at 100% height, the rendered page does not expand to fill the browser window/ I can set the object tag height to, say, 600, and it now is static at 600, but I want it to be dynamic just like when it was not hosted on a master page.

I do not believe this to be a silverlight issue, but rather a content placeholder sizing issue. I have tried a lot of diffferent ways to set the height, but nothing I do allows me to make the child page hosted object size itself based on the browser window,

Is it possile to get this to work or is this a consequence of using master pages? I can post sample code demonstrating this if needed.

EDIT: I was able to use a javascript function on window.onload to get the browser height and set the div height that contains the object tag, this works but is not dynamic. I would like it to be dynamic like the non-master page hosted object is.

View 2 Replies


Similar Messages:

Web Forms :: Dynamically Changing Size Of Content Placeholder Based On Browser Size?

Oct 14, 2010

I know the content palcehlder does not have a size ,I have a masterpage and content page, the master page has a table with a header, content area, and footer, header and footer are fixed size, content area is 100%. As the user sizes the browser the content area grows and shrinks and the footer stays at the
bottom of the browser window - perfect!

Problem: The contentpalceholder does not grow to fill the available content area. Now, the contentplaceholder gets its size from its contents, which in this case is a div holding a silverlight object.I was thinking I could hook the master or child page's re-size event and somehow pass that info onto the SL object, but as it turns out (and I'm surprised I never knew this) there is no aps.net page re-size event! (really?, wow.)

So is there a way to get a SL object hosted on a master page to size itself based on the size of the browser window?Or more generally, a way to size the contents (like a div or panel) of a contentplaceholder based on the browser? on a standard aspx page (not a master page) I CAN get the SL object to size itself based on the broswer, the problem seems to come from the fact that I'm hosting the SL object in a content placeholder.

I guess I could 'unroll' the master page into several standalone pages and have it work, but the menu is on the master page and I'm used to using them, plus it's already done...<sigh>

View 1 Replies

Master Pages - Content Web Form - Content From Placeholder Disappears

Apr 9, 2010

I'm attempting to set a class on the body tag in my asp.net site which uses a master page and content web forms. I simply want to be able to do this by adding a bodycssclass property (see below) to the content web form page directive.

It works through the solution below but when i attempt to view Default.aspx the Content1 control loses its content.

Here is how I'm doing it. I have a master page with the following content:

[code]....

View 2 Replies

Add Additional Content Into A Known Content Placeholder From A User Control

Aug 26, 2010

I have a UserControl that has some javascript I'd like to inject into a known ContentPlaceHolder.

I was hoping to do something like the following except when I append to add the control to found control I get an exception which says I cannot modify the control collection in the Init, Load or PreRender events:

"UserControl.ascx"

[code]....

View 1 Replies

MVC :: Hosting A Silverlight App In A View?

Mar 2, 2011

I have an MVC 3 app that I created an ASPX view with a Site.Master that hosts a silverlight app. I have to build some initparams to pass into the silverlight app so I have some C# sharp script that I put into the site.master page along with the javascript.

When I access the page I get an error, "The name 'BuildInitParams' does not exist in the current context". It seems it cannot find the script. Below is my code for both the master page and the aspx page. I've tried moving the script into the aspx page itself but got a totally different error that time.

[Code]....

[Code]....

View 4 Replies

Navigating From Silverlight To Hosting C#?

May 29, 2010

My app consists of Home and Map pages.

Home is ASP.NET. Map is hosting Silvellight.

How can I navigate from the Silverlight Map page to Home page?

View 1 Replies

MVC :: Hosting A Silverlight App Inside An MVC 3 View?

Feb 15, 2011

Is there anything special I need to do to host a Silverlight app inside an MVC app? Does anyone have any sample code or is it pretty much the same as with and aspx page? I tried it but I was never able to see my app so I may be missing something.

View 1 Replies

Web Forms :: Accessing The Content Of A PLACEHOLDER Control

Feb 18, 2010

Need accessing the rendered content of a PLACEHOLDER control. I dynamically add a web forms page to a placeholder using "TABLE" this works great (cell row table placeholder ) now I wish to take that placeholder and use the rendered page to generate a PDF document.

If it possible to access the rendered code how would this be done?

View 5 Replies

Web Forms :: Master Page Content Going Out Of Placeholder?

Sep 8, 2010

in my master page content place holder.

i have a grid which is going out of placeholder (as its bit bigger ), when page is loaded. i would prefer it to stay inside the placeholder or expand the placeholder.

Currently its going out side and when it moved out of placeholder it becomes transparent to the materpage default template.

View 5 Replies

Web Forms :: Setting Up Each Of TabPanels.ContentTemplates To Be Content Placeholder

Mar 8, 2010

Is there a benefit from putting a Tabcontainer control on a master page and setting up each of the tabPanels.ContentTemplates to be a content placeholder rather than putting everything into a regular .aspx page?

View 3 Replies

Web Forms :: Response.Write Output To A Content Placeholder?

Mar 18, 2010

the response.write() output does not show in content placeholder but on top of the page.

[Code]....

View 6 Replies

Hosting Silverlight Xap File - Only White Screen Displayed

Feb 17, 2010

I have a SL 3.0 xap I want to host in a ASP.NET website, I have access to the XAP file and I have created a HTML page to host the SL component.

When I access the page all I see is a white screen where the SL component should be, SL is loaded but the component is not displayed.

This is the HTML code for the SL div.

<body>
<form id="form1" runat="server" style="height:100%">
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="http://lonmw32795/SliverlightRESTfulWebservice.Web/ClientBin/SliverlightRESTfulWebservice.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="3.0.40818.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40818.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
</form>

View 3 Replies

Configuration :: Deploy Silverlight Application On Hosting Server?

May 11, 2010

i have develop my silver light application using asp.net and i want to deploy it , i am using vs 2010 and planing to use vsweb deployment project 2010 for beta

View 1 Replies

Web Forms :: Label Control Inside A Content Placeholder Using Master Pages

Aug 2, 2010

I am having a slight problem with adding text (output from a stored procedure) to a label control that is nested inside a contentplaceholder (ContentPlaceHolderProductsLeftCol). The page is also using master pages.

Below are excerts of the code - I think I would have to use teh findcontrol property however I am quite lost.

Label name is lastname and is located in ContentPlaceHolderProductsLeftCol

[Code]....

View 7 Replies

VS 2010 - How To See A Control In Another Content Placeholder

Apr 13, 2012

I'm using a masterpage and having some trouble with my ContentPlaceholders. I have a combobox(DropDownList1) in the sidemenu content placeholder and in my main placeholder I have a gridview. The gridview is supposed to do a select in the db using the selected value of DropDownList1. When I set up the connection SQL within the datagrid, using the wizard; I select to get a parameter from a control and then I select DropDownList1.

Now, When I try to run the page, it returns an error "Exception Details: System.InvalidOperationException: A control with ID 'DropDownList1' could not be found", however if I move DropDownList1 to the main placeholder, everything works perfectly.

How do I get asp.net to see the control sitting in the other placeholder?

View 2 Replies

Adjust DIV Height And Width To Actual Size Of Silverlight Control

Oct 25, 2010

I want to embed a silverlight app into a web page and have the height/width of the div that contains the silverlight control match the dimensions of the actual size of the silverlight control.

I essentially want the div to stretch to accommodate the size of the silverlight control. I do not know what size the silverlight control will be before it loads as it is pulling in data and adding controls dynamically. I want to avoid dueling scroll bars and use only the browser scroll bars.

I need this to work in both IE and Firefox.Is there a way to accomplish this?

View 2 Replies

Configuration :: Folder Size On Hosting Server Affect Performance?

Dec 14, 2010

we host the web application on a server and the structure is..

Root
Module1
page1.aspx
Module2
page4.aspx
Temp
archivedImages
image1 image2

The temp folder size is increased every month as we manually add images.

Except the Temp folder every page is requested from the browser...

We dont use the Temp folder for any other purpose other than archive.

Does this affect the performance of the web application i.e. constant size increase?

how different would it be if we moved the temp to some other location out of the Root?

View 1 Replies

C# - Want To Find Master Page's Content Placeholder And Add Text To It?

Dec 21, 2010

I tried this much:-

protected void Page_PreInit(object sender, EventArgs e)
{
class1 obj = new class1();
DataTable dt = new DataTable();
dt = obj.get_text();
ContentPlaceHolder ContentPlaceHolder1 = ContentPlaceHolder)this.Master.FindControl("ContentPlaceHolder1");
ContentPlaceHolder1. ????
}

View 3 Replies

Content Placeholder Javascript Object Expected Error

Jan 29, 2010

I have the following code behind that was, until recently, working fine and dandy!

tbxProdAC.Attributes.Add("onclick", "$('#" + GridView1.ClientID + "').remove();
$('#" + radProdAC.ClientID + "').attr('checked', true);
$('#" + ddlBuyer.ClientID + "').val('--Choose Buyer--');
$('#" + ddlSub.ClientID + "').val('--Choose Sub Category--');
$('#" + ddlProd.ClientID + "').val('--Choose Product--');");

However, ever since I have introduced the notion of content place holders (from a master page), I am repeated getting the Object Expected error.Now I understand why this is happening, asp.net is amending the control names to take into account the CPH i.e. $('#ctl00_ContentPlaceHolder1_radBuyer').attr('checked', true);

How do I go about reslving this issue, effectively 'renaming' my asp.net controls to take this into account?

View 1 Replies

C# - Creating Web Controls Inside A Content Placeholder Programmatically?

Mar 31, 2011

I've got a master page and a content page. How can I add controls to the master page's content placeholders programattically?

View 2 Replies

AJAX :: Updating Content Within A Placeholder (updatepanel) Using A Timer?

Feb 1, 2011

GOAL: on a web page (vb.net) content in a placeholder will refresh with a different .ascx (user control) every 30 seconds (rotating 3 in total) and of course i dont want to refresh the whole page, just the placeholder.

I'm new at AJAX (that's my first problem - lol)

I set the timer up to call a function, but not sure how to go about refreshing the placeholder with a different ascx file. I'm sure i'll be using UpdatePanel to do this, but haven't been able to figure this out. Easy to replace a value in a label using AsyncPostBack trigger, but nothing on how to achieve this.

View 2 Replies

Silverlight 4.0 With Sl4 Content?

Aug 19, 2010

We have an app template we've created in asp.net 2.0 that we use for our web apps. It has a header that hosts a couple controls (like a drop down for customer selection) and a language dropdown. It has a footer that's pretty static. In the middle is the content portion of the masterpage. Talk has come up as to whether we can make the content piece in SL4? I'm not sure how the two pieces (apps) would communicate - like for the customer selection changed. Has anyone done anything like this?

View 1 Replies

AJAX :: How To Work Update Progress In The Page Inside Content Placeholder

Jun 11, 2010

Is there possible to work update progress in the page inside content placeholder.

View 2 Replies

C# - Overlaying Html Content On Top Of Silverlight App?

Jan 8, 2010

I have a silverlight application that I am embedding in an existing ASP.NET web application. The web application has several drop-down navigation menus that would normally cover part of the silverlight app. I am aware of embedding the app using "windowless" mode, and if I do so the HTML menus show up on top of the silverlight plugin and everything looks great.

The problem is that I do not want to run in windowless mode due to its limitations. The application needs to handle MouseWheel events, which are not available natively in windowless mode. I am also not happy with the performance drawbacks of running in windowless mode. If I set windowless mode to false, the silverlight plugin is always rendered on top of the navigation menus which drop down behind it.

Is there any kind of CSS/JavaScript/Z-Index hackery that can be done to force certain divs of HTML on my page to render on top of the silverlight app WITHOUT running in windowless mode? I don't have high hopes as I understand this scenario is one of the main reasons for running in windowless mode.

View 1 Replies

Custom Server Controls :: Property Collections Not Persisted When Control Inside Update Panel And Content Placeholder

Apr 13, 2010

I'm creating an ASP.NET Control which has a property collection for Columns which the user can edit in the Property Collection Editor..

In most circumstances this works fine, the collection can be edited in the designer and the appropriate tags are added inside the control in the ASPX file.

It works fine when

My control is added to the form

[Code]....

My control is added inside an Update Panel

[Code]....

[Code]....

However, if My control is inside a Content Placeholder which is inside an Update Panel, it fails to work as it should. In this scenario, when the Columns collection is edited in the designer, if you then switch back to Source view, the Columns collection is emptied. I have to save the aspx page before switching back to Source view for the changes to be kept.

[Code]....

how to get around this problem? Is there something I may have missed?

Here's the code for the Control

[Code]....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved