Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8819681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:25:20+00:00 2026-06-14T05:25:20+00:00

In my javascript I create my <OBJECT> tag var htmlEmbedSilverlight = <div id=’silverlightControlHost’> +

  • 0

In my javascript I create my <OBJECT> tag

                var htmlEmbedSilverlight = "<div id='silverlightControlHost'> "
                        + "<object data='data:application/x-silverlight-2,' type='application/x-silverlight-2' width='550px' height='250px'> "
                        + "<param name='source' value='../../ClientBin/FotoEmprestimoChave.xap'/> "
                        + "<param name='onError' value='onSilverlightError' /> "
                        + "<param name='background' value='white' /> "
                        + "<param name='minRuntimeVersion' value='4.0.60310.0' /> "
                        + "<param name='autoUpgrade' value='true' /> "
                        + "<param name='initparams' values='chave_id=" + data + "' /> "
                        + "<a href='http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.60310.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>";
                $("#tiraFotoSilverlight").html(htmlEmbedSilverlight);

This is a reference to my Silverlight application where I call in my Web Application. The problem is my <param name='initparams' values='chave_id=" + data + "' /> " because in my App.xaml in Silverlight, I have the code below

 private void Application_Startup(object sender, StartupEventArgs e)
        {
            if (e.InitParams != null)
            {
                foreach (var item in e.InitParams)
                {
                    this.Resources.Add(item.Key, item.Value);
                }
            }

            this.RootVisual = new MainPage();            
        }

Where InitParams always has Count = 0 and I don’t know why. Can someone help me ? I’m just trying to pass a value to my Silverlight application, without a PostBack.

Rendered

    <object width="550px" height="250px" type="application/x-silverlight-2" data="data:application/x-silverlight-2,">
    <param value="../../ClientBin/FotoEmprestimoChave.xap" name="source">
    <param value="onSilverlightError" name="onError">
    <param value="white" name="background">
    <param value="4.0.60310.0" name="minRuntimeVersion">
    <param value="true" name="autoUpgrade">
    <param values="chave_id=1" name="initparams">
<a style="text-decoration:none" href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.60310.0">
</object>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:25:22+00:00Added an answer on June 14, 2026 at 5:25 am

    You’re using the wrong key/value pair for the param tag for initparams. You’re using <param values= when it should be <param value= (notice singular “value” vs plural “values”)

    Change your JavaScript line to:

    + "<param name='initparams' value='chave_id=" + data + "' /> "

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Silverlight control defined: <object id=objImageViewer data=data:application/x-silverlight-2, type=application/x-silverlight-2 width=100% height=500px> <param
In javascript you can create a Date object from a string, like var mydate
I have a web application that uses jQuery to dynamically create an silverlight object.
I wish to create a click-able object on a tag with javascript/jQuery. This obviously
Say in JavaScript I create a simple object: function MyObj() { this.prop = property;
i got a question when create a javascript object, when one function invoking another
I'd like to be able to create a javascript object from my html form
I want to create a Javascript class/object that allow me to have various method:
Basically I want to create one large object of many object in JavaScript. Something
I create a menu with a javascript object and jquery. I have certain items

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.