|
Shog9 wrote: Can you see if it's doing anything dodgy with navigation?
it's just doing a ShellExecute on a URL i provide.
the whole system is something like this:
desktop app starts an embedded IE window and calls out to the server to get a page to display. my code makes that page, so i can put anything i need to on it. the user hits links on that page which do various things: some are handled by the app, some go to other external URLs, some go back to our servers for various things, including documents. for some links, the app intercepts the navigate, does a little pre-processing, then ShellExecutes the link. i've tried these downloading things both ways, with the same result.
in the case of downloading, we have links that look like this:
http://getfile.asp?filename=____&blah=____
getfile.asp is pretty much what i posted above (with some path checks, to make sure nothing gets downloaded that shouldn't).
and, now that i think of it, there probably is a target="_blank" in there. otherwise, the document opens in the embedded IE window, and that's not what we want. i've fixed that bug a couple of times..
Shog9 wrote: and the only thing remotely similar to what you describe happens when i intercept the browser control's BeforeNavigate2 event and try to perform the navigation myself
for me, it's only happening with JPGs. .DOC, .PDF, etc. work OK (the new IE window goes away). but with JPGs i get the Action Canceled page, as soon as the registered JPG-handling app gets the file.
very puzzling.
thanks for spending some time on this.... i spent all of thursday and friday banging away at this wall.
Cleek | Image Toolkits | Thumbnail maker
-- modified at 13:14 Saturday 1st July, 2006
|
|
|
|
|
Chris Losinger wrote: it's just doing a ShellExecute on a URL i provide.
Hah! And here i thought i was trying something totally crazy...
Yeah, that'll do it. Well, the obvious bit at least - it'll open a new window, or re-use an existing one (if one exists and the user's IE settings allow). As to why it leaves a nav canceled page for JPG but not the rest, i don't know for sure... but i suspect it has something to do with how IE sniffs MIME types (which it does, even when you specify x-msdownload ). By the way: you do realize that using ShellExecute will open the user's default browser for all URLs, right? So potentially Firefox or Opera instead of IE...
So now, you really have two choices (short of modifying the app): Send the proper MIME type for JPG files (so they open in the browser rather than a separate app), or change your link to avoid the ShellExecute() call (since if the embedded browser tries to open it directly, it'll just download the file (possibly asking the user whether to ask or save first - again, depending on user and system settings).
|
|
|
|
|
I'm not exactly sure what you want.
Do you want the linked file to always be opened by an external IE window, or for the proper applications to open it?
Why don't you just pass the Response.Content type as "application/octet-stream" therefore when user clicks on the link the user can choose to open your PDF with their preferred reader?
"Democracy is two wolves and a sheep voting on what to have for dinner" - Ross
Edbert
Sydney, Australia
|
|
|
|
|
Edbert P wrote: Why don't you just pass the Response.Content type as "application/octet-stream"
i've tried that. i still get the stray 'Action Canceled' IE window.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Hi everyone,
The ASP files are stored on web-server and MS Access2K MDBs on another seperate data server ... How can I connect/access database from the one web-server to the other data-server...
Any sugesstions would be of great help.
Thanks in advance.
|
|
|
|
|
Hi,
If Firefox does not support ActiveX controls, then what form does a control have to take in order for Firefox to use it?
For instance, how is the Shockwave Flash player packaged so that Firefox can use it?
Thanks,
Rich
|
|
|
|
|
I have a legacy site that opens a simple page that showing data for a client. On occasion, a query might return multiple clients. I can intercept this in the VBScript in the page before the page draws itself. I would like to then open a new page for each one of the clients. I can't use the Response.Redirect method as that only opens one page. I can't use something like window.open as it tells me that an object is required. Is there a way to open a new window programatically from VBScript?
Thx
Mark Jackson
|
|
|
|
|
I think that following code will be useful for you although I did not get your problem completely.
In VBScript write following code when you want to open new window:
Response.Write("window.open('page.asp')");
Regards,
Ketan.
|
|
|
|
|
That worked perfectly, thanks for the help.
Mark Jackson
Ketan Majumdar wrote:
Response.Write("<script language='javascript'>window.open('page.asp')</script>");
|
|
|
|
|
Can a Singleton pattern have a protected constructor? If so, why/how?
thanks.
shireen
shireen
|
|
|
|
|
The difference between private and protected, is that something that is protected can be access by an inheriting class.
So the reason why the constructor would be protected is that you could inherit the class and use the constructor.
---
b { font-weight: normal; }
|
|
|
|
|
I have 5 boys and they all love to play flash games online. When they fnish playing I look at the screen and there are about 900 pop-ups from them clicking on ads...$$$!
I love da dotNet but I need to learn how to write these things. Does anyone have a recommendation as to where I should begin? I'm looking for a good book, online course, etc. I know absolutely nada about how these things are developed, but I intend to learn!
Any recommendations?
"Half this game is ninety percent mental."
- Yogi Berra
My y and h don't work so well due to my addiction to caffeine and my inability to set a cup down upright.
If you can read thank a teacher, if you can read in English, thank a Marine.
|
|
|
|
|
I believe you would have to get a version of Macromedia Flash and start from there. The Macromedia forums would give you a good start I imagine, but as for later development, I know that Barnes and Nobles bookstores as well as Borders bookstores carry Macromedia Flash development books. I haven't thoroughly looked through one of these books but it should be helpful as well. If you're going to go through Macromedia to get it's program, hope your wallet is full because it can get pricey, their new suite is $1000, or a smaller $165 through a university. If you have more questions, I have a friend who is quite talented in Flash and could give you some pointers if he's willing.
~ Axel Seitz
|
|
|
|
|
Hey all,
I need to force the broswer to raise a file download dialog box for specific files (http://support.microsoft.com/default.aspx/kb/260519[^]).
I have tried to search Google, and I found this link:
http://www.aspfaq.com/show.asp?id=2161[^]
Since I want to use this method (which works all the time - btw) in a dynamic way - where one page (download.asp) serves more then one file - I need query strings.
The problem is that is it unsafe to use when changing download.asp to accept query strings, because users can change the strings to download whatever files they want.
Any other ideas or alternatives will be appreciated.
Much Thanks.
Regards,
Zdr.
-- modified at 9:34 Thursday 29th June, 2006
|
|
|
|
|
Verify that the path that comes in the querystring is in a folder where you allow downloads.
Or store the paths of the downloadable files in a database, and only send the id of the file in the querystring.
---
b { font-weight: normal; }
|
|
|
|
|
Or use session variables.
|
|
|
|
|
That, however, requires that you know what file is going to be downloaded when the previous page is created. If that page is used to select the file, you don't know what file the user will select.
---
b { font-weight: normal; }
|
|
|
|
|
Use linkbuttons or regular buttons and do the Session.Add in the Click event handler.
Obviously this won't work with regular old html anchors or asp hyperlink controls.
|
|
|
|
|
And then do a redirect? Causes another roundtrip to the browser, but it works.
---
b { font-weight: normal; }
|
|
|
|
|
Yeah, its certainly not the best way... but it might be the easiest.
|
|
|
|
|
I have a window service which is using a web service.
Now the window service is calling a web service function after a particular interval, so eash time a new web service object is created.
Is there a way i can use a single object but since it's a web service function the problem is if i use a single object then it will retain the previous request values which i dont want.
Can anyone help?
Thanx in advance
|
|
|
|
|
Well,
I think that you have to keep in mind that the HTTP is a stateless protocol. This means that once a request is served tha server has no idea of where the next request is coming from.
Hence, every request will instantiate a different object...
Out of curiosity, how many requests does your system perform?
Make sure you kill all objects and database connections.
Jason Kataropoulos
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
i thinking to put an ip address tracker on my site to track my visitor so i know where they from. how can i create it?
|
|
|
|
|
There are many ways to due this. In ASP.NET you can use Request.UserHostAddress to get the IP, then just log it somewhere. But it sounds like what you really want is the referrer which is the website that the visitor came from. You don't need their IP to get the referrer. It will be in your IIS log. Or, you can use a free service from sitemeter.com , statcounter.com, google.com/analytics which is what I'd recommend for you. They will provide you with a small script to put on each page of your site. I use Google Analytics myself, which will provide you with a lot of valuable data, referrer being just one of them.
"Half this game is ninety percent mental." - Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
M y and h don't work so well due to m addiction to caffeine and m in abilit to to set a cup down uprigt.
|
|
|
|
|
the statcounter only provide until less then 100 visitor...
is the sitemeter.com is a free service and unlimited counter ? i mean atleast support 5 digit.
Actually i was thinking to create my own counter cause i want to invisible the counter from visitor, but i able to see how many visitor have come visit my site and their ip , country from my server... do i need to learn JS or asp coding to create function like that?? if there is a free service have on this function that will be great.
|
|
|
|