2 Methods to do this

1) Using HtmlPage.Document.GetElementById

HtmlPage.Document.GetElementById("txtData").SetProperty("value",
DataText.Text);

txtData is the control in silverlight XAML
DataText is the textbox on ASP.NET (.aspx) page

Refer this link for more details
http://www.dotnetglobe.com/2011/05/passing-parameters-between-silverlight.html

2) Using initparams

Add parameters in <param> tag
<param name="initparams" id="initParams" runat="server" value=""/>

Add parameters in code
initParams.Attributes.Add("value", "key1=Brij, key2=Mohan");

Access the params in Application_Startup

private string firstKey, secondKey;
  private void Application_Startup(object sender, StartupEventArgs e)
  {
      if (e.InitParams.ContainsKey("key1"))
          this.firstKey = e.InitParams["key1"];
      if (e.InitParams.ContainsKey("key2"))
           this.secondKey = e.InitParams["key2"];
       this.RootVisual = new MainPage(firstKey, secondKey);
 }

More Details
http://www.dotnetglobe.com/2011/05/passing-parameters-between-silverlight.html


Regards
Raghu



On Oct 17, 11:01 am, Guna <[email protected]> wrote:
> Hi friends,
> I want to know whether we can embed the silverlight page into an
> asp.net page?
> If we can please suggest me on how to do integration with the asp.net
> page
> I am using vb.net 2010 and silver light 4
>
> if we click a button in asp page some text must be printed in text box
> of silver light page this is my need and if i get the way of
> integration i will go further development of my web site which
> requires the same functionality .
>
> thanks in advance
>
> Ganesh...

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to