(ASP.net) # character in URL field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

If a .html filename has a "#", IE displays it ok when you double click it
using Window explorer.

In my application I define a datagrid; bind it to a datatable; define a
column in Datagrid as a HyperLink Column and bind its URL field to a field in
the datatable. It works ok normally.

Now I assign a full path .html filename with a "#". When I click the link
and the IE comes up, the URL is cut off just at "#". So IE says the page
can't be displayed.

Do I miss any property settings or is it a bug in ASP.net?

Thanks in advance.

Li
 
Hi Li,

Welcome to MSDN newsgroup.
Regarding on the html page file name of which contains '#' 's displaying in
IE browser issue, I think it's an expected behavior since when we host the
html file in IIS server and request through the http://server/xxxxx url,
the client browser will treat the '#' char as a particular character( html
anchor mark...) and remove all the chars after it... e.g:

when we request Http://localhost/test#html.html, the browser will
actually only send "http://localhost/test"....

this is different from when opened directly in file explore which dosn't
parse the '#' char... I've tried this through both IE and firefox , this
is a common behavior for intercepting the '#' anchor mark.... So for web
document that host on webserver, we should avoid such particular chars in
file name....

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)





--------------------
| Thread-Topic: (ASP.net) # character in URL field
| thread-index: AcYdCU9woyL6hJTIQgq5b+jfBLUsHw==
| X-WBNR-Posting-Host: 198.234.129.210
| From: "=?Utf-8?B?TGkgV2VuZw==?=" <[email protected]>
| Subject: (ASP.net) # character in URL field
| Date: Thu, 19 Jan 2006 07:02:05 -0800
| Lines: 19
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.general
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.general:186620
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Hi,
|
| If a .html filename has a "#", IE displays it ok when you double click it
| using Window explorer.
|
| In my application I define a datagrid; bind it to a datatable; define a
| column in Datagrid as a HyperLink Column and bind its URL field to a
field in
| the datatable. It works ok normally.
|
| Now I assign a full path .html filename with a "#". When I click the link
| and the IE comes up, the URL is cut off just at "#". So IE says the page
| can't be displayed.
|
| Do I miss any property settings or is it a bug in ASP.net?
|
| Thanks in advance.
|
| Li
|
|
 
Back
Top