Little Help: IE Displays IMG but Fire Fox Does Not: Coders

Its Official I have the dumb:



I just cannot figure it out, why IE Explorer shows the image fine, and Fire Fox doesn't, cross platform programming is difficult some times.

Hey, I usually wouldn't do this, but this problem has plagued me for some time, and I will explain. But first let me show you my code:

This is how it is represented in fire fox, and IE.

< span id="UploadPicture1_Label1"> img src="&92Images&92Blue hills.jpg"alt="bla" title="bla bla bla" width ="250" height = "250"/> </span>


This is the method that saves and image and then plugs it in as HTML


protected void Button1_Click(object sender, EventArgs e)
{

FileUpload1.SaveAs(Server.MapPath(@"\Images\") + FileUpload1.FileName);
string filename = FileUpload1.FileName;
imagename = filename;
Label1.Text = "<img src=" + "\""+"\\Images" + "\\"+filename + "\""+ "alt=\"bla\" title=\"bla bla bla\"" + " width =\"250\"" + " height = \"250\"/>";
Label2.Text = TextBox1.Text;
}


When the button is pressed, the label text should change to a image tag and display an image. But it works in IE, and then does not work in Fire Fox. Maybe the HTML is malformed?

I wish I could put this in the rage channel, because I am suffering from Code Rage, and I sit in a public office area... so I have to go outside to curse.

Any help would be great!

EDIT: \" or \\ these are escape from code characters.. allows the text to contain punctuation normally reserved for compiler activities.

Example:

string test = "he said\"Look at this sift talk, its complete crap\"";
Output: he said\"Look at this sift talk, its complete crap\"

string test = "he said"Look at this sift talk, its complete crap"";
OutPut: SYNTAX ERROR

EDIT: go here to learn how to denote punctuation as html code. Character Entities

Load Comments...

Send this Article to a Friend



Separate multiple emails with a comma (,); limit 5 recipients






Your email has been sent successfully!

Manage this Video in Your Playlists

New Blog Posts from All Members