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

  • Home
  • SEARCH
  • 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 7638771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:15:16+00:00 2026-05-31T08:15:16+00:00

In C#, Asp.net, I’m creating Javascript code through my code-behind : var silverlightControl =

  • 0

In C#, Asp.net, I’m creating Javascript code through my code-behind :

var silverlightControl = null;
function PluginLoaded(sender, args) 
{
  silverlightControl = sender.getHost();
  silverlightControl.Content.SilverlightScriptableObject.PerformRfidRead(); //**1**  
} 

function CallSilverlight() 
{
  silverlightControl.Content.SilverlightScriptableObject.PerformRfidRead(); //**2**  
}

var tid = setInterval(RefreshTimer, 2000);
function RefreshTimer()
{
  CallSilverlight();
}

It works perfectly on Firefox and Chrome but cannot seems to work on IE 9 ! The PluginLoaded Method is always called properly. But it seems that my “silverlightControl” var lose its value between methods calls…

When calling my Method “PerformRfidRead()” directly after sender.getHost() (cf. 1), everything is normal. When letting the timer do the call every 2 seconds (cf. 2), it seems my var is empty and I receive the following error message :

Content » : null object or undefined

Any idea ?

Thanks for your help.

  • 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-05-31T08:15:17+00:00Added an answer on May 31, 2026 at 8:15 am

    I finally put my finger on this problem :

    Firefox, Chrome and IE9 have different behavior regarding timers !

    My RefreshTimer method was called too early and the PluginLoaded method couldn’t be called soon enough to initialize the silverlightControl object !

    Therefore, I corrected by doing this :

    function CallSilverlight() 
    {
      if(silverlightControl != null)
      {
        silverlightControl.Content.SilverlightScriptableObject.PerformRfidRead(); //**2**  
      }
    }
    

    Hope this can help someone…

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

Sidebar

Related Questions

ASP.NET Ajax Library provides some client-side events. For instance: Sys.Application.add_load( function(args) { // handle
ASP.NET profile properties are trivially available to the code-behind of an ASPX web page
ASP.Net: In code-behind I can simulate <%# Eval(Property)%> with a call to DataBinder.Eval(myObject,Property); How
Asp.net 4 and C#. I have a string in my Code Behind. I would
ASP.NET 2.0 provides the ClientScript.RegisterClientScriptBlock() method for registering JavaScript in an ASP.NET Page. The
ASP.NET MVC - what is this in VB.NET? Html.TextBox( name, null, new { @class
ASP.Net / Javascript / Jquery We come across a feature in http://www.cnn.com/TECH/ - Which
ASP.NET application performing oAuth with Facebook. This code was working fine until a few
ASP.NET MVC can generate HTML elements using HTML Helpers, for example @Html.ActionLink() , @Html.BeginForm()
ASP.Net 3.5 I want to create a user control that contains the ListView and

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.