Click here to Skip to main content
15,889,403 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi ,

I got A webproject that has Session Items , One of the links in my project direct to silverlight page , I want to view all the session Items at silverlight page.

I tried to get the session Items in Silverlight code but all I get is Null refernce ,but i managed to check it by mix code.
In the WebPage that created by silverlight , I tried to view it in the Mix Code <%=Session[item]%> , it worked well but i want to get my session items in silverlight code and do with that some stuff , mix code is not my favorite way to work.

Thanks in advance for the help .
Posted
Updated 3-Jun-11 21:58pm
v2

1 solution

 
Share this answer
 
Comments
idanb 4-Jun-11 4:17am    
Hi ,

Its look nice ... but i lost him in step 2 .

It's seems to be a good explanation for Vertan programmer , But he doesnt show the Code inside webconfig , and i thinkj its important .

thanks anyway , ill wait for another solve.
Mark Salsbery 4-Jun-11 21:59pm    
The web.config code is there. Just click on the "Browse Code" tab. ASP.NET code runs on the server, Silverlight code runs on the client, so you'll need some kind of way to request session info from the server, and WCF is an easy way to do it. Step 2 is add the WCF service, right? Just right click your project (or use the project menu), choose "Add new item...", find "WCF Service" in the "Web" section, name it "SessionService.svc" to match the article, and click the "Add" button.
idanb 5-Jun-11 11:48am    
I try that ...
I'm Keep Getting this exeption :

" Object reference not set to an instance of an object."

I realy like an simple example .
thanks .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900