Showing posts with label appear. Show all posts
Showing posts with label appear. Show all posts

Wednesday, March 28, 2012

Strange characters displayed in file name - File Download Dialog - IE

I don't know what else to try - In my asp.net app, when the file name has
Windows-1252 characters (like and ), these characters appear, each one,
as two strange characters in the file name label in Internet Explorer File
Download Dialog that is shown when I click a link to download the file. The
file content is being generated on-the-fly using asp.net and the filename is
being passed using a call to Response.AddHeader with the strings
"Content-Disposition" and "attachment; filename=" + filename.

I want the file name to display correctly, as it DOES when I click a link in
a test HTML file that points to a "real" file stored in the system.

I tried setting Response.ContentEncoding but all my atempts were
unsuccessful.
I have also searched the net, specially google groups for an answer but I
couldn't find.

Thank you in advance,

Daniel CardosoAfer trying a little bit more, I decided to analyze the HTTP response
generated by the server in response to a request to download the file. I
then realized that the special characters were being wrongly represented and
sent to the client. I had to use Server.UrlEncode to encode the file name
appropriately, in addition to setting Response.ContentEncoding, so that the
special symbols were correctly sent to the browser. The problem is now
solved.

Regards,

Daniel Cardoso

"Daniel Cardoso" <someone@.nospam.com> wrote in message
news:uMYy4yXoEHA.2636@.TK2MSFTNGP09.phx.gbl...
> I don't know what else to try - In my asp.net app, when the file name has
> Windows-1252 characters (like and ), these characters appear, each one,
> as two strange characters in the file name label in Internet Explorer File
> Download Dialog that is shown when I click a link to download the file.
The
> file content is being generated on-the-fly using asp.net and the filename
is
> being passed using a call to Response.AddHeader with the strings
> "Content-Disposition" and "attachment; filename=" + filename.
> I want the file name to display correctly, as it DOES when I click a link
in
> a test HTML file that points to a "real" file stored in the system.
> I tried setting Response.ContentEncoding but all my atempts were
> unsuccessful.
> I have also searched the net, specially google groups for an answer but I
> couldn't find.
> Thank you in advance,
> Daniel Cardoso

Strange characters displayed in file name - File Download Dialog - IE

I don't know what else to try - In my asp.net app, when the file name has
Windows-1252 characters (like and ), these characters appear, each one,
as two strange characters in the file name label in Internet Explorer File
Download Dialog that is shown when I click a link to download the file. The
file content is being generated on-the-fly using asp.net and the filename is
being passed using a call to Response.AddHeader with the strings
"Content-Disposition" and "attachment; filename=" + filename.
I want the file name to display correctly, as it DOES when I click a link in
a test HTML file that points to a "real" file stored in the system.
I tried setting Response.ContentEncoding but all my atempts were
unsuccessful.
I have also searched the net, specially google groups for an answer but I
couldn't find.
Thank you in advance,
Daniel CardosoAfer trying a little bit more, I decided to analyze the HTTP response
generated by the server in response to a request to download the file. I
then realized that the special characters were being wrongly represented and
sent to the client. I had to use Server.UrlEncode to encode the file name
appropriately, in addition to setting Response.ContentEncoding, so that the
special symbols were correctly sent to the browser. The problem is now
solved.
Regards,
Daniel Cardoso
"Daniel Cardoso" <someone@.nospam.com> wrote in message
news:uMYy4yXoEHA.2636@.TK2MSFTNGP09.phx.gbl...
> I don't know what else to try - In my asp.net app, when the file name has
> Windows-1252 characters (like and ), these characters appear, each one,
> as two strange characters in the file name label in Internet Explorer File
> Download Dialog that is shown when I click a link to download the file.
The
> file content is being generated on-the-fly using asp.net and the filename
is
> being passed using a call to Response.AddHeader with the strings
> "Content-Disposition" and "attachment; filename=" + filename.
> I want the file name to display correctly, as it DOES when I click a link
in
> a test HTML file that points to a "real" file stored in the system.
> I tried setting Response.ContentEncoding but all my atempts were
> unsuccessful.
> I have also searched the net, specially google groups for an answer but I
> couldn't find.
> Thank you in advance,
> Daniel Cardoso
>

Monday, March 26, 2012

Strange danish letters bug.

Hello,
I have a web site and i use some danish text on some of the page.
The letters appear as expected when i view the site with the VS 2005 built
in web server.
When i deploy the site either by XCOPY or as precompiled on win 2k3 IIS 6,
then i loose my danish chars.
can someone tell me how i can best deal with this problem.
many thanks in advance
JJOn 13 Feb, 10:15, "Jens Jensen" <j...@.jensen.dk> wrote:
> Hello,
> I have a web site and i use some danish text on some of the page.
> The letters appear as expected when i view the site with the VS 2005 built
> in web server.
> When i deploy the site either by XCOPY or as precompiled on win 2k3 IIS 6
,
> then i loose my danish chars.
> can someone tell me how i can best deal with this problem.
> many thanks in advance
> JJ
Are you including charset="UTF-8" in your html headers? Might be the
browser not interpreting the encoding correctly, so if you set it
explicitly it could work (alternatively, ISO-88591 should also be a
suitable encoding for Danish).
Tobes
> Are you including charset="UTF-8" in your html headers? Might be the
> browser not interpreting the encoding correctly, so if you set it
> explicitly it could work (alternatively, ISO-88591 should also be a
> suitable encoding for Danish).
> Tobes
>
Hi Tobes, that is an interesting detail. Can you give an example of where i
need to write this?
I'm using a master page.
Thanks
JJ
I tried the following :
<head runat="server">
<title>Untitled Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-88591"/>
</head>
<head runat="server">
<title>Untitled Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
non of them seems to help

Strange danish letters bug.

Hello,
I have a web site and i use some danish text on some of the page.
The letters appear as expected when i view the site with the VS 2005 built
in web server.
When i deploy the site either by XCOPY or as precompiled on win 2k3 IIS 6,
then i loose my danish chars.

can someone tell me how i can best deal with this problem.

many thanks in advance
JJOn 13 Feb, 10:15, "Jens Jensen" <j...@.jensen.dkwrote:

Quote:

Originally Posted by

Hello,
I have a web site and i use some danish text on some of the page.
The letters appear as expected when i view the site with the VS 2005 built
in web server.
When i deploy the site either by XCOPY or as precompiled on win 2k3 IIS 6,
then i loose my danish chars.
>
can someone tell me how i can best deal with this problem.
>
many thanks in advance
JJ


Are you including charset="UTF-8" in your html headers? Might be the
browser not interpreting the encoding correctly, so if you set it
explicitly it could work (alternatively, ISO-88591 should also be a
suitable encoding for Danish).

Tobes
Are you including charset="UTF-8" in your html headers? Might be the

Quote:

Originally Posted by

browser not interpreting the encoding correctly, so if you set it
explicitly it could work (alternatively, ISO-88591 should also be a
suitable encoding for Danish).
>
Tobes
>


Hi Tobes, that is an interesting detail. Can you give an example of where i
need to write this?
I'm using a master page.

Thanks
JJ
I tried the following :
<head runat="server">

<title>Untitled Page</title>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-88591"/>

</head>

<head runat="server">

<title>Untitled Page</title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

</head>

non of them seems to help

Thursday, March 22, 2012

Strange Image Problem

I have created a master page and inserted a couple images. When I look at them in design view the appear as a box with an x in it which is not correct. When I view the page in the browser it displays the image. What is the problem?

Here is the master page code:

<%@dotnet.itags.org. Master Language="VB" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<script runat="server"
</script
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<center>
<img src="http://pics.10026.com/?src=Images/delilogo.jpg" runat="server"/><br /> <img src="http://pics.10026.com/?src=Images/topmenu.jpg" runat="server"/>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder></center>
</div>
</form>
</body>
</html>

The designer in VS is no good. I would rely on your source and forget the designer most of the time. But if you really want the images to appear in the designer, try draging and dropping your images from VS Solution Explorer onto the designer surface.

Hope this helps.


Hinzamorski ,

try the following:

<asp:ImageID="Image1"runat="server"ImageUrl="~/im.JPG"/>


Hi nzamorski,

I'm sure this should work as well as the asp:Image control.

<img src="http://pics.10026.com/?src=Images/delilogo.jpg" runat="server"/>

First, where is your website project located? Is it IIS project or File System project? Please double check the folder structure if the relative path to Images/delilogo.jpg is right. When the website is located in IIS server, the relatvie path to the image in a virtual directory or a web application might be different.

I agree with the guys above, you can drag and drop the image if you are not certain of the path to the image. But first make sure the Images folder is in the root folder of the project. Thus you will find the folder is appearing in the Solution Explorer window of Visual Studio. Pick up the image and drag & drop it into the Design View will be simpler.

Hope it helps.