Skip to main content

Microsoft Silverlight

Answered Question silverlight does not apper in my master and content page.RSS Feed

(0)

foolsday
foolsday

Member

Member

0 points

3 Posts

silverlight does not apper in my master and content page.

 i successfully installed the VS 2008, SL2 beta 2 and Xpression Blend 2.5 June 2008 preview everything works fine, i made the "Hello World" project easily that i've learned in "WinVideo-SL-GettingStarted.wmv" Video tutorial.

 i run my FirstSilverlightTestPage.aspx and it works fine.

here's the code:

<%@ Page Language="VB" AutoEventWireup="true" %>

<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
    TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%;">
<head runat="server">
    <title>Test Page For myFirstSilverlight (felix)</title>
</head>
<body style="height:100%;margin:0;">
    <form id="form1" runat="server" style="height:100%;">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div  style="height:100%;">
            <asp:Silverlight ID="Xaml1"
                             runat="server"
                             Source="~/ClientBin/myFirstSilverlight.xap"
                             MinimumVersion="2.0.30523"
                             Width="100%"
                             Height="100%" />
        </div>
    </form>
</body>
</html>

 

but when i run the Default.aspx silverlight does not appear

here's the code:

<%@ Page Language="VB" MasterPageFile="~/ROLMaster.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="webform_Default" title="Home Page" %>
<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
    TagPrefix="asp" %>
   
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<p>Welcome To My Content Page</p>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:Silverlight ID="Xaml1"
                         runat="server"
                         Source="~/ClientBin/myFirstSilverlight.xap"
                         MinimumVersion="2.0.30523"
                         Width="100%"
                         Height="100%" />


</asp:Content>


 

HarshBardhan
HarshBar...

Star

Star

9908 points

1,719 Posts

Re: silverlight does not apper in my master and content page.

Hi.

If if in your Master page  ScriptManager is there then i you can remove scriptmanager and can try..

 

Mark as answer if this post answered your question.

Harsh Bardhan

foolsday
foolsday

Member

Member

0 points

3 Posts

Re: silverlight does not apper in my master and content page.

Hi HarshBardhan, thank you for your reply...

my master page doesn't have scriptmanager.

my FirstSilverlightTestPage.aspx is not belong to my MastarPage only the Default.aspx i just copy this line of code from FirstSilverlightTestPage.aspx to Default.aspx

 

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:Silverlight ID="Xaml1"
                         runat="server"
                         Source="~/ClientBin/myFirstSilverlight.xap"
                         MinimumVersion="2.0.30523"
                         Width="100%"
                         Height="100%" />

</asp:Content>

Allen Chen – MSFT
Allen Ch...

Star

Star

13860 points

1,802 Posts

Re: silverlight does not apper in my master and content page.

Hi

If it only happens in FireFox please try this:

Master page:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html  style="height: 100%;"  xmlns="http://www.w3.org/1999/xhtml">
<head runat="server" >
    <title>Untitled Page</title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body style="margin: 0pt; height: 100%;">
    <form id="form1" runat="server" style="height: 100%;">
  
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
       
        </asp:ContentPlaceHolder>
  
    </form>
</body>
</html>

 

Content page:

<%@ Page MasterPageFile="~/MasterPage.master"%>
<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
    TagPrefix="asp" %>


    <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<p>Welcome To My Content Page</p>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
         <div  style="height:100%;">     
              <asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/SilverlightApplication42.xap" MinimumVersion="2.0.30523" Width="100%" Height="100%" />

</div>

</asp:Content>

 

If not please post a demo project that can reproduce this problem.

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

foolsday
foolsday

Member

Member

0 points

3 Posts

Answered Question

Re: Re: silverlight does not apper in my master and content page.

Hi Allen thanks for the reply, i already fixed the problem by installing the VS2008 SP1

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities