Click here to Skip to main content
11,920,156 members (57,786 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# Silverlight
I'm having an issue trying to get my html code/javascript to display inside of a web browser control.
I don't have a phone to test on so I'm using the Emulator with VS2010 Ultimate.

I tried to use this site:
Site 1

I have added all of the folders and files and set the output to "Resource" in the solution explorer.

My code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
namespace BitComposer
    public partial class EditPage : PhoneApplicationPage
        public EditPage()
        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
            Stream stream = Assembly.GetExecutingAssembly()
            StreamReader reader = new StreamReader(stream);
            string html = reader.ReadToEnd();

I've also tried to navigate to the html page, still no luck.
Posted 12-Sep-12 10:44am
Sergey Alexandrovich Kryukov 12-Sep-12 15:49pm
How do I know that "BitComposer.Editor.html" is correct or not?
Why would it be in the Manifest? Why not using a regular .resx resource? Then you don't even need to use StreamReader (always unsafe), as there are auto-generated code with properties.
Just a note: software development is not a matter of luck. It is only if you use some existing code and try-and-error approach, which does not generally work.

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

  Print Answers RSS
0 OriginalGriff 455
1 phil.o 170
2 CPallini 150
4 F-ES Sitecore 130
0 OriginalGriff 6,778
1 KrunalRohit 4,495
2 Sergey Alexandrovich Kryukov 3,153
3 George Jonsson 2,810
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web04 | 2.8.151120.1 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100