The following sample shows you how to force focus to the silverlight control when your aspx page comes up. In the body tag add the following javascript (where XAML1 is the ID of your Silverlight control
<
body onload="document.getElementById('XAML1').focus()" style="height:100%;margin:0;">Your Silverlight control tag should already look something like this.
<asp:Silverlight ID="XAML1" runat="server" Source="~/ClientBin/MySilverlightApp.xap" MinimumVersion="2.0.30523" Width="100%" Height="100%" />
Manikavelu VelayuthamPosted Aug 18, 2011, 3:21 AM
I have a very strange issue in my application when its get deployed in HTTPS environment. I have two text boxes which is a silveright user control. I just used this control in an aspx page which has two buttons save and cancel buttons. When i click the save button using mouse after entering the values in the text boxes, the value is not captured. if i simply click the user control before click the save button, the value is captured. if i use the keyboard to press the save button (using tab and press the space bar or enter button), the value is captured. Does the issue related to focus problem in silverlight control ? Can you provide me a solution for this ?