Skip to main content

MSDN

Answered Question How to use silver light XAML controls in multiple aspx pages in asp.net website?RSS Feed

(0)

kondamca
kondamca

Member

Member

24 points

86 Posts

How to use silver light XAML controls in multiple aspx pages in asp.net website?

 Hi All,

I have created a silverlight application with two xaml files search.xaml and results.xaml.Hosted in asp.net web application

asp.net web application having two aspx pages search.aspx and results.aspx.

I have to use search.xaml file control in search.aspx and results.xaml file in results.aspx.

when user enter his search info and click on search button which is there in search.xaml it should get the results from the service and bind the results to the grid in results.xaml file.

 Is this possible to integrate two different xaml controls in two different pages?

How to integrate two different xaml controls in two different aspx pages?

How to transver the data between these above two aspx pages?

Can any one please provide some guidelines to solve my issues. Please provide any sample applications which is having this kind of requirements.

 

Thanks in advance.

Regards,

Konda.

 

 

Tony.Champion
Tony.Ch...

Contributor

Contributor

3958 points

560 Posts

Answered Question

Re: How to use silver light XAML controls in multiple aspx pages in asp.net website?

Your best bet is to break it up into two Silverlight Apps, for two reasons:

First, since you are talking about two seperate aspx pages, you are going to have to pass the information from the search.xaml, in a link, to the results.aspx page.  Then take the input in the results.xaml and load your grid.

Second, you can create multiple entry points into your application pass variables into your xaml, but depending on the growth of your application it doesn't scale well.  You are loading the code and resources needed for both search and result each time.  As you add controls this will make you xap even larger.

 Is it possible to have a single aspx page in your application?  That would simplify things greatly from a Silverlight perspective.  You could even have Silverlight call out to AJAX javascript to update any portions of the aspx page.

Anyway, hope this helps.

Tony Champion

 

jeetumaker
jeetumaker

Member

Member

525 points

92 Posts

Answered Question

Re: Re: How to use silver light XAML controls in multiple aspx pages in asp.net website?

First of all as mentioned by Tony, try putting both the XAML on the same ASPX page as dividing your XAMLs across ASPX pages defeats the purpose of using Silverlight. You will be better off using ASP.NET alone. still if you need to span across ASPXX pages, another alternative is to store your results in IsolatedStorage and then have your second XAML read the ISOStorage. This way you will not be passing the same data back and forth to the server multiple times.

I hope this helps. Please click on the "Mark as Answer" if it has answered your question.

Thanks
Jeetu Maker
http://jeetumaker.blogspot.com
(Light_up_your_apps) using Silverlight.2.0;
  • Unanswered Question
  • Answered Question
  • Announcement