What about pointing to a HTML page that redirects to the intended
URL+Anchor?  It's been a while since I had to mess with HTML so not sure
if the server does this or if any ole html will do.

Regards,
J. Vince Pacella / OOCL Chicago
Tel - 773-399-6218 Fax - 773-867-5050

Cargo Tracking Online at:
www.cargosmart.com and www.oocl.com


-----Original Message-----
From: Unmoderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Frans Bouma
Sent: Friday, June 18, 2004 1:28 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] launching an html page with an anchor


> I don't know if this helps (probably not, I crash and burn on
> this list when I say anything, hah).. But maybe passing the 
> string as a variable?
> This is how I do what I do:

> string url = 
> @"http://xxx/QUERYB/blstatusquery/msgTracking4bl2.asp?BLNum=";
> + BLNumber; System.Diagnostics.Process.Start(url);

        I think that will not work either, as the string parser in
Process.Start() simply stops when it runs into a '#', I think. The sad
thing is that there is no default special character defined for '#',
like there is for some special characters like '&'. Also the ascii
equivalent '%23' doesn't work in the url. 

                FB

> 
> Regards,
> J. Vince Pacella / OOCL Chicago
> Tel - 773-399-6218 Fax - 773-867-5050
> 
> Cargo Tracking Online at:
> www.cargosmart.com and www.oocl.com
> 
> 
> -----Original Message-----
> From: Unmoderated discussion of advanced .NET topics. 
> [mailto:[EMAIL PROTECTED] On Behalf Of Jeroen van 
> den Bos (DT)
> Sent: Thursday, June 17, 2004 9:57 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [ADVANCED-DOTNET] launching an html page with an anchor
> 
> 
> Hi Chad,
> 
> Actually, if I change it to file://c:\mypage.html#anchorname
> it just opens IE pointing to file://c:\mypage.html with the 
> anchor suddenly gone!
> 
> -Jeroen
> 
> -----Original Message-----
> From: Unmoderated discussion of advanced .NET topics. 
> [mailto:[EMAIL PROTECTED] On Behalf Of Chad M. 
> Gross
> Sent: donderdag 17 juni 2004 16:10
> To: [EMAIL PROTECTED]
> Subject: Re: [ADVANCED-DOTNET] launching an html page with an anchor
> 
> Jeroen,
> 
> Based on your sample code snipit,
> System.Diagnostics.Process.Start (@"c:\mypage.html");, just 
> remeber that good old IE will take 
> "C:\mypage.html#anchorName" in the 
> Process.StartInfo.Arguments property.
> But if your lauching those other browsers like Mozilla you 
> cannot.  If you are attemping to launch a local file you 
> should use the file:// sytax, 
> "file://C:/mypage.html#anchorName".  Also, your original 
> problem would have been solved had you coded, 
> System.Diagnostics.Process.Start(@"file://c:/mypage.html#ancho
> rName");.
> But like Joakim indicated, you don't want to shell to the 
> file directly because you could get an HTML editor.
> 
> Chad
> 
> On Thu, 17 Jun 2004 15:09:46 +0200, Jeroen van den Bos (DT)
> <[EMAIL PROTECTED]> wrote:
> 
> >Thanks for the link, saves me some time :)
> >
> >-Jeroen
> >
> >-----Original Message-----
> >From: Unmoderated discussion of advanced .NET topics.
> >[mailto:[EMAIL PROTECTED] On Behalf Of Joakim 
> >Karlsson
> >Sent: donderdag 17 juni 2004 14:44
> >To: [EMAIL PROTECTED]
> >Subject: Re: [ADVANCED-DOTNET] launching an html page with an anchor
> >
> >Yeah, you must do some trimming. The command line stored in the
> registry
> >might contain any kind of parameters (and even 8.3 path names).
> >
> >This article contains an example:
> >http://ryanfarley.com/blog/archive/2004/05/16/649.aspx
> >
> >/Joakim
> >
> >----- Original Message -----
> >From: "Jeroen van den Bos (DT)" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Thursday, June 17, 2004 2:35 PM
> >Subject: Re: [ADVANCED-DOTNET] launching an html page with an anchor
> >
> >
> >Joakim,
> >
> >Thanks for that tip! And since the KB specifically instructs to use
> that
> >key to retrieve the default browser I suppose I'd better use it.
> >
> >The only thing that annoys me here is that my entry has the
> following
> >value in that key:
> >
> >"C:\Program Files\Internet Explorer\iexplore.exe" -nohome
> >
> >which, if you send it to System.Diagnostics.Process.Start(),
> throws an
> >exception because it doesn't understand the parameter (the string
> should
> >probably contain only the location of an executable and nothing more,
> it
> >probably doesn't parse anything like cmd does) so I guess
> I'll have to
> >do some trimming/regexping :(
> >
> >And concatenating this value and the link and sending everything to
> >cmd.exe is probably considered dirty as well :)
> >
> >-Jeroen
> >
> >-----Original Message-----
> >From: Unmoderated discussion of advanced .NET topics.
> >[mailto:[EMAIL PROTECTED] On Behalf Of Joakim 
> >Karlsson
> >Sent: donderdag 17 juni 2004 13:54
> >To: [EMAIL PROTECTED]
> >Subject: Re: [ADVANCED-DOTNET] launching an html page with an anchor
> >
> >Jeroen,
> >
> >Actually you should check "HKCR\http\shell\open\command".
> Checking html
> 
> >or htmlfile might give you a html editor instead.
> >
> >Check out the following KB article:
> >http://support.microsoft.com/default.aspx?scid=kb;en-us;283225%22
> >
> >/Joakim
> >
> >----- Original Message -----
> >From: "Jeroen van den Bos (DT)" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Thursday, June 17, 2004 7:36 AM
> >Subject: [ADVANCED-DOTNET] launching an html page with an anchor
> >
> >
> >Hi all,
> >
> >I'm trying have my application launch an html page with a certain
> anchor
> >as a parameter. I want to launch the default webbrowser, so
> just for an
> 
> >html page I would do (c#):
> >
> >System.Diagnostics.Process.Start(@"c:\mypage.html");
> >
> >Unfortunately this doesn't work if I want to launch
> >c:\mypage.html#someanchor.
> >
> >I've tried figuring out where to find an executable path to the
> system's
> >default browser, but the only thing I could find was a registry
> >reference (HKEY_CLASSES_ROOT\htmlfile\shell\open\command), 
> but I'm not
> >entirely sure if I want to/can depend on that information being
> >available and appropriate on every user's machine.
> >
> >Thanks in advance for any ideas!
> >-Jeroen
> >
> >===================================
> >This list is hosted by DevelopMentor(r)  http://www.develop.com Some
> >.NET courses you may be interested in:
> >
> >NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> >http://www.develop.com/courses/gaspdotnetls
> >
> >View archives and manage your subscription(s) at
> >http://discuss.develop.com
> >
> >===================================
> >This list is hosted by DevelopMentor(r)  http://www.develop.com Some
> >.NET courses you may be interested in:
> >
> >NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> >http://www.develop.com/courses/gaspdotnetls
> >
> >View archives and manage your subscription(s) at
> >http://discuss.develop.com
> >
> >===================================
> >This list is hosted by DevelopMentor(r)  http://www.develop.com Some
> >.NET courses you may be interested in:
> >
> >NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> >http://www.develop.com/courses/gaspdotnetls
> >
> >View archives and manage your subscription(s) at
> >http://discuss.develop.com
> >
> >===================================
> >This list is hosted by DevelopMentor(r)  http://www.develop.com Some
> >.NET courses you may be interested in:
> >
> >NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> >http://www.develop.com/courses/gaspdotnetls
> >
> >View archives and manage your subscription(s) at
> >http://discuss.develop.com
> >
> >===================================
> >This list is hosted by DevelopMentor(r)  http://www.develop.com Some
> >.NET courses you may be interested in:
> >
> >NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> >http://www.develop.com/courses/gaspdotnetls
> >
> >View archives and manage your subscription(s) at
> http://discuss.develop.com
> 
> ===================================
> This list is hosted by DevelopMentor(r)
> http://www.develop.com Some .NET courses you may be interested in:
> 
> NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> http://www.develop.com/courses/gaspdotnetls
> 
> View archives and manage your subscription(s) at
> http://discuss.develop.com
> 
> ===================================
> This list is hosted by DevelopMentor(r)
> http://www.develop.com Some .NET courses you may be interested in:
> 
> NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> http://www.develop.com/courses/gaspdotnetls
> 
> View archives and manage your subscription(s) at
> http://discuss.develop.com
> 
> 
> IMPORTANT NOTICE
> Email from OOCL is confidential and may be legally
> privileged.  If it is not intended for you, please delete it 
> immediately unread.  The internet cannot guarantee that this 
> communication is free of viruses, interception or 
> interference and anyone who communicates with us by email is 
> taken to accept the risks in so doing.  Without limitation, 
> OOCL and its affiliates accept no liability whatsoever and 
> howsoever arising in connection with the use of this email.  
> Under no circumstances shall this email constitute a binding 
> agreement to carry or for provision of carriage services by 
> OOCL, which is subject to the availability of carrier's 
> equipment and vessels and the terms and conditions of OOCL's 
> standard bill of lading which is also available at 
> http://www.oocl.com.
> 
> ===================================
> This list is hosted by DevelopMentor(r)  http://www.develop.com
> Some .NET courses you may be interested in:
> 
> NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> http://www.develop.com/courses/gaspdotnetls
> 
> View archives and manage your subscription(s) at
> http://discuss.develop.com
> 
> 
> 
> 

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com Some
.NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at
http://discuss.develop.com


IMPORTANT NOTICE
Email from OOCL is confidential and may be legally privileged.  If it is not intended 
for you, please delete it immediately unread.  The internet cannot guarantee that this 
communication is free of viruses, interception or interference and anyone who 
communicates with us by email is taken to accept the risks in so doing.  Without 
limitation, OOCL and its affiliates accept no liability whatsoever and howsoever 
arising in connection with the use of this email.  Under no circumstances shall this 
email constitute a binding agreement to carry or for provision of carriage services by 
OOCL, which is subject to the availability of carrier's equipment and vessels and the 
terms and conditions of OOCL's standard bill of lading which is also available at 
http://www.oocl.com.

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to