Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Page navigation between silverlight pages[XAML & HTML]
12 replies. Latest Post by zperic on August 11, 2009.
(0)
mangesh.v.s
Member
8 points
6 Posts
08-22-2007 12:10 PM |
We are implementing 'Isolated feature of silverlight' for our website.we are keeping some user information on client side through Isolated feature of silverlight. And we want to retrieve those information again.
Using TestPage.html and Page.xaml we are able to store the information on client machine in isolated storage area.
To retrieve information from isolated storage file we have added one html & xaml page to our project.
To redirect from TestPage.html to newly added html page we have written one javascript function on 'TestPage.html' but its fetching error 'Permission Denied.'
Following Js code we have used to redirect to another page
window.location.href="RetrievePage.html ";
we have also tried window.open ,But facing same error
Can we retrive the information that is store in the isolated file after Browser is closed or any time we require from same file
luisabreu
Participant
1676 points
612 Posts
08-22-2007 12:14 PM |
hello.
well, changing the location of your window should be enough...does the error happen when you load the html page or when your silverlight code that retrieves the isolated storage content runs?
08-22-2007 2:25 PM |
see actually what i am doing is
I am saving data to isolated file on testpage.html(the default html page of silverlight project)
And trying to retrive the same data on another htlm page as that I added (by add new item)
IN default html page we are calling a java script function,which is supposed to redirect us to other html page.
we have defined textblock
and on the textblocks click event I am calling the js function
And through this function we are trying to go to the added html page using
windows.location.href="page name"And also tried wondows.open
And i get the error when this function is executed
swirling...
1348 points
385 Posts
08-22-2007 3:12 PM |
Are you running it in a hosted environment? If not, it's denying you access because you don't have access to local files.
08-23-2007 2:00 AM |
we are running the application on our local machine i.e client & server is the same for application.
we are using visual studio 2008 beta2 ( vista machine) template for silverlight application.The default page for silverlight application is 'TestPage.html' as follow : code for that is as follow
we are calling js function callfun() on body onload event of 'TestPage.html' to redirect to 'nextPage.html' which fetchs error 'Permission Denied'.
<
<!-- saved from url=(0014)about:internet -->
function callfun()
{
window.location.href = "nextPage.html";
}
</
justncase80
349 points
144 Posts
08-23-2007 1:00 PM |
I changed "nextPage.html" to "http://www.google.com/" and it worked fine, maybe the problem is that you need to have the full url instead of a relative url?
08-23-2007 1:20 PM |
Maybe someone else can explain this better than I can. Visual studio doesn't run the Silverlight html files on its development server. So when you go to debug, you're not in a hosted environment. Probably the easiest way to get in a hosted environment is to add a new project/web site (aspx page) to your solution, right click on it, and select Add Silverlight Link. Then run it from the aspx page.
Let's see if I can explain it another way. If it's not hosted, nextPage.html is really something like C:/somedirectorypath/nextPage.html. You're not going to have access to anything on c:, you need it to be http. In a hosted environment, nextPage.html really means something like http://localhost/nextPage.html.
08-26-2007 2:43 PM |
Hi,
Yes i have also tried the same "http://www.google.com/" and it works
But if go and add a html page in my silverlight project
and call the same html page using windows.location.herf="html page name" then it gives error
is windows.location.herf=" " a correct way?
or any idea hoe to call the other html which is in same project.
And how to integrate this silverlight project to my existing web apllication which is developed in asp.net
jasonxz
1752 points
530 Posts
08-29-2007 6:13 PM |
Actually, I believe it's window.location="nextPage.html".
Have you tried window.location="http://www.google.com" or window.location="default.html"?
Also, if you're working on your asp.net website in VS2K8, you can right-click your website and click "Add Silverlight link" to integrate your Silverlight project with your asp.net website.
08-30-2007 2:17 AM |
Actually, I used window.location.href="nextPage.html".not window.location=" "
I tried window.location.href="http://www.google.com" ,it works
I will try to"Add Silverlight link" to integrate your Silverlight project with your asp.net website.
thanks for your valuable response
nirav123
6 points
5 Posts
08-19-2008 7:42 AM |
Hi! I am being troubled as i want the code thru which we can navigate between XAML pages.I am using SilverLight 2 Beta 2.All the stuff on net gives the code in C# which works fine but when i convert it in VB,results are changed.If anybody had got code for it plz help me out.
lijoputh...
108 points
51 Posts
12-17-2008 1:55 AM |
try this
here am closing one page by clicking the button.
and am calling my Default.xaml here.
private void btnExit_Click(object sender, RoutedEventArgs e)
if this help u pls mark it as answer
zperic
2 points
1 Posts
08-11-2009 3:50 AM |
lijoputhuval thanx a lot for help...