Neha Goyal

Hi Experts,

I am using the WebBrowser control in my application,in which i want to show the image but it's now showing the image.

I am using .net compact framework 2.0 SP 2 for my application.

The source code that i m using as follows:

private void Form1_Load(object sender, EventArgs e)

{

string path = string.Empty;

path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)+"\\WindowsLiveMessengersmall.jpg";

webBrowser1.DocumentText = string.Format("hi.......<img src='"+path+"'></img>");

}

It shows text proper and empty image.

Any suggestion.........

Thanx

----------------------

Neha Goyal



Re: Smart Devices VB and C# Projects No image display in the WebBrowser

Christopher Fairbairn

Hi,

I have always had success by using URLs with the file:// protocol specified and using / as a directory seperator instead of \, i.e. try to see if something like the following displays an image for you (this image should be present on most Pocket PC devices).

Code Block

string path = "file:///windows/webguide.bmp";

webBrowser1.DocumentText = string.Format("hi.......<img src='" + path + "'></img>");

Hope this helps,

Christopher Fairbairn






Re: Smart Devices VB and C# Projects No image display in the WebBrowser

Neha Goyal

Hi,

Thanx Christopher.....

It really solve out my problem.

Thanx

-------------------

Neha Goyal