How silverlight control interact with web page
Last post 05-11-2008 11:26 PM by mchlSync. 3 replies.
Sort Posts:
05-10-2008 11:38 AM
How silverlight control interact with web page

Hi, all,

I am new to silverlight. Follow the tutorial I create a simple silverlight control placed in web page (default.aspx). My question is how to display result of silverlight control to defaut.aspx page, and pass parameter from default.aspx to silverlight control. Please give me a hint or which document I should go through. Many thanks.

HarrySmile

xmharrylight

Joined on 05-10-2008
Posts 2
05-10-2008 2:06 PM
Re: How silverlight control interact with web page

 Start form here:

http://silverlight.net/learn/tutorials.aspx 

Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

sladapter

Joined on 03-05-2008
Indiana, US
Posts 404
05-11-2008 11:06 PM
Re: How silverlight control interact with web page

Hi, sladapter ,

I have gone through the tutorial you recommended, but I did not work out my problem. For example, there is a silverlight calender control, how can its selected date be shown in a label which resides on web page. Also, how to changed seleced date by click a button which resides on web page. Thanks.

xmharrylight

Joined on 05-10-2008
Posts 2
05-11-2008 11:26 PM
Marked as Answer
Re: How silverlight control interact with web page

xmharrylight:
there is a silverlight calender control, how can its selected date be shown in a label which resides on web page. .
 

You can use HTML DOM for that.

For example:

HtmlDocument _doc;   // requires using System.Windows.Browser;
_doc = HtmlPage.Document;
_doc.GetElementById("yourLable").SetAttribute("value", "This is a date from Silverlight "); 
xmharrylight:
how to changed seleced date by click a button which resides on web page. Thanks.
 
You can pass the date from ASP.NET  to Silverlight using "initParam" . There are a lot of samples how to use "initParam" in our forum.. 

 

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlSync

Joined on 09-16-2005
Singapore
Posts 2,021