By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,035 Members | 1,543 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,035 IT Pros & Developers. It's quick & easy.

Hyperlink not operating correctly in ASPX file

P: n/a
Hi,

I am trying to put a hyperlink to a .cer (certificate) file on a form.
Normally (on a ,htm page) when the user clicks on the hyperlink, the file is
not recognized and the user is given the option to save the file. This is
the desired result. However, when I put the hyperlink on a webform, the
file is opened and it's binary contents are displayed on the screen. Does
anyone know why this happens?

The hyperlink is as follows:

<a hreg="myfile.cer">Test Cert</a>

I also tried using Hyperlink web control and setting the
NavigateUrl="myfile.cer", but the results are the same.

Thanks,

jerry
Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
I would assume the problem is MIME related. Check with Google and see what
kind of MIME type .CER files should be set to, or just set the server to
return "application/octet-stream" - that's sure to get a save box.

--Chris

"JerryK" <je****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Hi,

I am trying to put a hyperlink to a .cer (certificate) file on a form.
Normally (on a ,htm page) when the user clicks on the hyperlink, the file
is not recognized and the user is given the option to save the file. This
is the desired result. However, when I put the hyperlink on a webform,
the file is opened and it's binary contents are displayed on the screen.
Does anyone know why this happens?

The hyperlink is as follows:

<a hreg="myfile.cer">Test Cert</a>

I also tried using Hyperlink web control and setting the
NavigateUrl="myfile.cer", but the results are the same.

Thanks,

jerry

Nov 19 '05 #2

P: n/a
Thanks for the reply. I assumed it was MIME replated, but it is very strange
that it works from an HTML page but not from an ASPX page.

Just where does one set the return? This is a hyperlink control in the
middle of a dozen other controls on the form. Also, I do not see any
properties that effect the return when the user clicks a hyperlink control.

jerry
"Chris Dickens" <ch***@NOSP-Mobject-zone.net> wrote in message
news:eJ***************@TK2MSFTNGP12.phx.gbl...
I would assume the problem is MIME related. Check with Google and see what
kind of MIME type .CER files should be set to, or just set the server to
return "application/octet-stream" - that's sure to get a save box.

--Chris

"JerryK" <je****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Hi,

I am trying to put a hyperlink to a .cer (certificate) file on a form.
Normally (on a ,htm page) when the user clicks on the hyperlink, the file
is not recognized and the user is given the option to save the file.
This is the desired result. However, when I put the hyperlink on a
webform, the file is opened and it's binary contents are displayed on the
screen. Does anyone know why this happens?

The hyperlink is as follows:

<a hreg="myfile.cer">Test Cert</a>

I also tried using Hyperlink web control and setting the
NavigateUrl="myfile.cer", but the results are the same.

Thanks,

jerry


Nov 19 '05 #3

P: n/a
MIME types are normally configured in the IIS Manager by going to properties
on the web server machine and clicking the "MIME Types" button. If you do
not have admin rights to the web server (like if you're hosted) then you'll
have to call/e-mail your web host and have them add it for you.

I'm not sure why a browser would react differently if the link is on an HTM
vs an ASPX page - the web server returns the MIME type as a part of the
headers at the top of each response sent to the web browser and this
determines how the browser reacts, not the page before you click the link.
What browser is it?

--Chris

"JerryK" <je****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Thanks for the reply. I assumed it was MIME replated, but it is very
strange that it works from an HTML page but not from an ASPX page.

Just where does one set the return? This is a hyperlink control in the
middle of a dozen other controls on the form. Also, I do not see any
properties that effect the return when the user clicks a hyperlink
control.

jerry
"Chris Dickens" <ch***@NOSP-Mobject-zone.net> wrote in message
news:eJ***************@TK2MSFTNGP12.phx.gbl...
I would assume the problem is MIME related. Check with Google and see
what kind of MIME type .CER files should be set to, or just set the server
to return "application/octet-stream" - that's sure to get a save box.

--Chris

"JerryK" <je****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Hi,

I am trying to put a hyperlink to a .cer (certificate) file on a form.
Normally (on a ,htm page) when the user clicks on the hyperlink, the
file is not recognized and the user is given the option to save the
file. This is the desired result. However, when I put the hyperlink on
a webform, the file is opened and it's binary contents are displayed on
the screen. Does anyone know why this happens?

The hyperlink is as follows:

<a hreg="myfile.cer">Test Cert</a>

I also tried using Hyperlink web control and setting the
NavigateUrl="myfile.cer", but the results are the same.

Thanks,

jerry



Nov 19 '05 #4

P: n/a
I have control of the server so I can check out the IIS settings.

The browser is IE

It is not unique to this installion of IIS or IE also. I tried on
server/client combinations and the results are the same. Very strange.
Windows Server 2003 (my client) seems to know about the .CER extension. It
reports it as a Certificate file in File Explorer.
jerry

"Chris Dickens" <ch***@NOSP-Mobject-zone.net> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
MIME types are normally configured in the IIS Manager by going to
properties on the web server machine and clicking the "MIME Types" button.
If you do not have admin rights to the web server (like if you're hosted)
then you'll have to call/e-mail your web host and have them add it for
you.

I'm not sure why a browser would react differently if the link is on an
HTM vs an ASPX page - the web server returns the MIME type as a part of
the headers at the top of each response sent to the web browser and this
determines how the browser reacts, not the page before you click the link.
What browser is it?

--Chris

"JerryK" <je****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Thanks for the reply. I assumed it was MIME replated, but it is very
strange that it works from an HTML page but not from an ASPX page.

Just where does one set the return? This is a hyperlink control in the
middle of a dozen other controls on the form. Also, I do not see any
properties that effect the return when the user clicks a hyperlink
control.

jerry
"Chris Dickens" <ch***@NOSP-Mobject-zone.net> wrote in message
news:eJ***************@TK2MSFTNGP12.phx.gbl...
I would assume the problem is MIME related. Check with Google and see
what kind of MIME type .CER files should be set to, or just set the
server to return "application/octet-stream" - that's sure to get a save
box.

--Chris

"JerryK" <je****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Hi,

I am trying to put a hyperlink to a .cer (certificate) file on a form.
Normally (on a ,htm page) when the user clicks on the hyperlink, the
file is not recognized and the user is given the option to save the
file. This is the desired result. However, when I put the hyperlink on
a webform, the file is opened and it's binary contents are displayed on
the screen. Does anyone know why this happens?

The hyperlink is as follows:

<a hreg="myfile.cer">Test Cert</a>

I also tried using Hyperlink web control and setting the
NavigateUrl="myfile.cer", but the results are the same.

Thanks,

jerry



Nov 19 '05 #5

P: n/a
Yeah, the File Explorer behaviour is entirely different. I'm interested to
hear if setting a MIME type corrects your problem.

--Chris

"JerryK" <je****@nospam.com> wrote in message
news:eL****************@TK2MSFTNGP14.phx.gbl...
I have control of the server so I can check out the IIS settings.

The browser is IE

It is not unique to this installion of IIS or IE also. I tried on
server/client combinations and the results are the same. Very strange.
Windows Server 2003 (my client) seems to know about the .CER extension.
It reports it as a Certificate file in File Explorer.
jerry

"Chris Dickens" <ch***@NOSP-Mobject-zone.net> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
MIME types are normally configured in the IIS Manager by going to
properties on the web server machine and clicking the "MIME Types"
button. If you do not have admin rights to the web server (like if you're
hosted) then you'll have to call/e-mail your web host and have them add
it for you.

I'm not sure why a browser would react differently if the link is on an
HTM vs an ASPX page - the web server returns the MIME type as a part of
the headers at the top of each response sent to the web browser and this
determines how the browser reacts, not the page before you click the
link. What browser is it?

--Chris

"JerryK" <je****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Thanks for the reply. I assumed it was MIME replated, but it is very
strange that it works from an HTML page but not from an ASPX page.

Just where does one set the return? This is a hyperlink control in the
middle of a dozen other controls on the form. Also, I do not see any
properties that effect the return when the user clicks a hyperlink
control.

jerry
"Chris Dickens" <ch***@NOSP-Mobject-zone.net> wrote in message
news:eJ***************@TK2MSFTNGP12.phx.gbl...
I would assume the problem is MIME related. Check with Google and see
what kind of MIME type .CER files should be set to, or just set the
server to return "application/octet-stream" - that's sure to get a save
box.

--Chris

"JerryK" <je****@nospam.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> I am trying to put a hyperlink to a .cer (certificate) file on a form.
> Normally (on a ,htm page) when the user clicks on the hyperlink, the
> file is not recognized and the user is given the option to save the
> file. This is the desired result. However, when I put the hyperlink
> on a webform, the file is opened and it's binary contents are
> displayed on the screen. Does anyone know why this happens?
>
> The hyperlink is as follows:
>
> <a hreg="myfile.cer">Test Cert</a>
>
> I also tried using Hyperlink web control and setting the
> NavigateUrl="myfile.cer", but the results are the same.
>
> Thanks,
>
> jerry
>
>



Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.