|
I believe the dialog you mention is part of your browser functionality. For example, IE or whatever browser you use will prompt you for download, show progress of files that are to be downloaded, or even launch the file with appropriate application.
All you do is create the hyperlink for the downloaded content (i.e. zip, wmv, etc.)
Example:
<a href="/relativepath/somefile.mpg>A cool tune</a>
The browser will handle the file according to the settings. For example, it may launch a hyperlinked .mpg file with Media Player or some other player that is registered with your operating system.
<br>
<hr noshade width="100%" color=#80BFFF>
<p style="background: #C0CBEE;border:2px solid #80BFFF;margin:0px;padding:2px;font-size:8pt;text-align:left;width:457"><a style='color:white' href='/script/profile/whos_who.asp?id=26227'>R.Bischoff</a>
.NET, Kommst du mit?
|
|
|
|
|
That is one way to do it.. thanks for reminding me =)
but the thing is, my web application enables the user to create a file, which I'd rather specify the target location of the file first, before it's created.. so implementing a save file dialog will be just what I'm looking for...
but your idea is quite good as well... =) .. If you know how to implement a save file dialog.. that'll be a bunch of help for me.. =)
Thanks
Rico
|
|
|
|
|
You can't create a file on the user's machine from a web site, so just download the content to the browser, which will create the file after downloading it (or some browsers will create the file in the spot the user specified immediately). I mean, if a web site had the power to just create files on a user's machine, think of how big a security hole that would be!
What the previous post said is the only way to do it unless you want to implement some complex Java applet, ActiveX control, or .NET UserControl (not as easy as you might think because of code access security). But why? It would be a complete waste of time.
If you need to create the file on the fly, so do it. This is common. Do you think a web server just redirects a request for a file? No, it reads the file into a buffer and streams it to the client, which reads the stream as it can.
So, just start writing to the response stream and forget about the client. Their browser will prompt for a location (they may cancel) and start writing what you're buffering on the server to the location the user specified. You (writing the server code) don't have to worry about a thing. This is how web servers (not to mention most daemons) work.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Does anyone know of a control, activex component or otherwise which allows one to edit AVI files and their embeded sound?
I have a time sensitive project of which that will be a part. I need to be able to embed the interface into my own but would rather do as little work as possible on the actual editor (due to the time constraints).
I would also rather buy a fully supported component than a free one-off project (uless its REALLY robust)
--Tony Archer
"I can build it good, fast and cheap. Pick any two."
|
|
|
|
|
Since you didn't specify what kind of editing you need and you didn't even bother to go to google for this:
http://www.softcities.com/VideoEdit-ActiveX-Control/download/6926.htm
which is USD77
|
|
|
|
|
Ok, sorry, let me specify.
I need to be able to cut/paste sections of an avi file (including sound).
Select sections of it and play just those (to preview it) etc.
Imagine most wave editors, but add the video element to it as well.
Small request, isn't it?
--Tony Archer
"I can build it good, fast and cheap. Pick any two."
|
|
|
|
|
well for something small microsoft made a tool that you can cut/paste
AVIEDIT.EXE i think is on one version on vc++ or better yet check the web for free avi editor or on sourceforge.net
anyway you probably need some better to do what you asked!
|
|
|
|
|
visit www.NCTSoft.com . I think there is what u need.
NCTVisualStudio is really good set of activeX libraries.
|
|
|
|
|
Thank you. I'd looked at their audio editing component (which does exactly what I want, by the way) but hadn't taken a hard look at their video studio component. Your post convinced me to look at it closer and it will do what I need.
THANK YOU!
For anyone else this company makes many multimedia components as ActiveX DLLs They also have a few .NET components.
http://www.nctsoft.com/
NCTVideoStudio - video editing
NCTAudioStudio - audio editning
NCTAudioEditor - a drop down audio editing control (very nice)
NCTImageStudio - image editing (haven't checked it out)
NCTPhotoStudio.NET - ?? image processing (haven't checked it out)
NCTSWFProducer.NET - Make macromedia flash files. (haven't checked it out)
NCTFinancialChart.NET -??
NCTDiscWriter - burn dvd's / cds from what I can tell (haven't checked it out)
NCTDialogicVoice - ?? looks like some text to speach thing, but I'm not sure
--Tony Archer
"I can build it good, fast and cheap. Pick any two."
|
|
|
|
|
look at vdub on sourceforge, its not a component, but it does exactly what u want it to, why have a component?
|
|
|
|
|
VirtualDub is a stand alone application and therefore does not meet my needs. My whole purpose is to take a convoluted process with external programs being used and tie them into one easy interface.
After spending all night working on it, the components from NCTSoft do not synch up nicely. Their audio editing component is nice. and their video components do what they were intended for, but it is nigh-on impossible to get them to synch without a slight delay between the two.
Anyone know of another video editing component? I have 20 days to build this project (rediculous, yes?) And therefore would MUCH rather not have to build something from scratch.
--Tony Archer
"I can build it good, fast and cheap. Pick any two."
|
|
|
|
|
How can i know if an control has added an event.
Example:
Boton.Click+=new ..........<br /> How can I ask to control if it has added that event?
Thank you!
La realidad no es más que impulsos eléctricos del cerebro - Morpheus
|
|
|
|
|
You can either declare your own add and remove accessors for your event (like the get and set accessors for properties), or use a collection or dictionary with events for when objects have been added or removed. If you want to do something like this for a control's events, you should override them like so:
public event Click
{
add
{
if (value.Target is IMyInterface)
base.Click += value;
}
remove { base.Click -= value; }
} This would allow you to selectively allow event handlers to be added to an event. If you wanted, you could create an event on this subclass that you would fire from these accessors when a delegate (event handler) is added or removed.
If you're just looking for a way to determine if an event handler is added to or removed from and event without going through these steps, I really don't see how that's possible without using some sort of profiler, which is definitely not an easy task.
Although, that does bring up another way, though this really would work for controls. You could use a context-bound object and intercept the event add and remove calls using aspect-oriented programming techniques.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
I would like to send some data to some page on the web, that will then process that data.
I would liek to send for instance.
How do I do that?
I checked MSDN but didn't find anything.
Thanx in advance.
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Look at the documentation for the HttpWebRequest.GetRequestStream method in the .NET Framework SDK. It has a complete example. We have also covered this many times in the forum, so you could always search (although the responses are either the same or similar to what's in the .NET Framework SDK (which, btw, is installed locally with VS.NET by default and you should use that since it'll be much faster to use and right at your finger tips).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I dont use VS.NET.
I checked MSDN but didn't find anything as I said.
I have now searched for HttpWebRequest.GetRequestStream , and now it works.
Thanx
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
|
Code-Behind is c#, and this is for webform.
Assuming you have 2 dropdown list.
Here's a sample code to illustrate.
<asp:dropdownlist id="ddl1" runat="server" OnSelectedIndexChanged="ChangeBehavourddl1" autopostback="true">
<asp:dropdownlist id="ddl2" runat="server" OnSelectedIndexChanged="ChangeBehavourddl2" autopostback="true">
Values from ddl2 will be dependable on ddl1.
In otherwords, when you change the selection on ddl1, ddl2 will change it's results.
Here's my question.
Before writing this code in .Net, I used to have a JavaScript Code that actually disable the dropdown form. But how would you do it in ASP.Net ?
I know the grey out syntax. In this particular case it's:-
ddl1.enabled = "false"
And I can't put this in the OnSelectedIndexChanged method call. Since it's server side control. I need something that is called instantaneously on the front-end.
This is a problem to me because, some query (on ddl1) takes longer than anticipated and i don't want user to select ddl2, before the results for ddl1 is done querying.
Stanley
|
|
|
|
|
First of all, this belongs in the ASP.NET forum, but I'll award bad behavior anyway since it at least relates to .NET and possibly even C# (unlike the SQL question posted after this one).
EVERYTHING in ASP.NET comes down to a class or member. The <asp:DropDownList> control is just the System.Web.UI.WebControls.DropDownList class. So you can set its Enabled property to false , except it's not a string - it's a boolean property so drop the quotes. In-line with the ASP.NET page as HTML, the attribute is a string by the TypeConverter for that property is able to convert strings to boolean values and vice versa. So, in your SelectedIndexChanged event handler, you can set ddl1.Enabled to false so long as you have a reference to it. In ASP.NET 1.x, your .aspx page inherits from your code-behind .cs source file. So, create two protected members like so:
protected DropDownList ddl1;
protected DropDownList ddl2; When they're instantiated in the .aspx page, these members in your base class will not be null. VS.NET does this by default when you create new pages in an ASP.NET Web project.
Just make sure that in most cases when you're modifying properties that correspond to attributes or child elements that are output to the HTML document sent to the client that you enable the ViewState property. This isn't always the case, but reading and discovering how to effectively use the ViewState (which is enabled by default) will help.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Do Windows store icons somewhere in the registry? Do you know the path?
I had to change the toolbar icon for our application, and it works. But when you start the app, for a split second the old icon flashes on the bottom. I can't figure out where it's coming from!!
I changed App.ico and the icon on the main form.
Any ideas?
Thanks,
Elena
|
|
|
|
|
"Windows" doesn't store icons anywhere. Applications store icons however they want to. If you just changed the App.ico and the main form's icon, this won't change the icon for your toolbar. Be default, Visual Studio .NET puts the ImageList for a toolbar into a ResX file (localized resources). That image is still in the ResX file and apparently you're programmatically changing the toolbar at runtime.
Edit the ImageList for your toolbar and remove that image, or replace it with App.ico. In this event, the icon data will be serialized to the ResX file, which gets compiled as a binary .resources file associated (i.e., name similarily) as the class it's "bound" to (in the designer, that is). If you want to see this, click "View Hidden Files" in the solution explorer when your project is selected. It will appear under your form or control if you drill-down (i.e., click the +) sign.
Note that .NET applications do not utilize the registry (they can, but this is not recommended). Also, Windows Explorer (the Windows shell) does cache file association icons in a system image list, but this has absolutely nothing to do with your problem in particular. This is just FYI.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I'm not sure if we are talking about the same thing. (Or I simply don't understand)
When I talk about toolbar I am talking about the standrard Windows toolbar at the bottom of the screen that shows you the apps you are running. It always has a little icon.
How can I change ImageList for this toolbar?
Elena
|
|
|
|
|
That's the task bar - not just any old toolbar. You should be more specific next time.
These images may be cached in the system image list, but I've never seen a problem such as yours. You can use something like TweakUI from the PowerToys installation for your respective Windows OS to clear this cache.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
I have just started using C#. I currently use VB6 with the Cheetah database system. There is a VB.Net wrapper available for the system, however there is no C# version yet. Can someone point mew in the right direction of linking to a windows 32bit dll from C#. The VB.Net wrapper can be found on http://www.planetsquires.com
Many Thanks
John Messingham
|
|
|
|
|
It doesn't have to be C#. All languages targetting the CLR (Common Language Runtime) compile to Intermediate Languages (IL), which is contained in modules embedded in an assembly. Just compile the VB.NET wrapper to an assembly, then reference that assembly in your C# project and use it. The source language matters very little.
The biggest differences between languages is what they support. VB.NET does not, for example, support unsafe contexts when C# does. There is slight differences in compiler optimizations as well. They still compile down to IL.
This is what makes the "language independence" of the .NET Framework possible (well, one of the things).
I suggest you read at least the overview and programming topics in the .NET Framework SDK[^] before just jumping into it. Understanding at least what comprises the .NET Framework is important. At least skimming through the class library documentation will give you some indication of the functionality exposed by the Framework Class Library (FCL).
Also, if you'd rather just include the wrapper code in your C# project (which, IMO, is a complete waste of time - see my previous solution, which is a more common approach), then translate it. Syntax is really the only thing that's different. A majority of the calls is to classes, interfaces, members, etc. of the FCL, which are common and available (at least, CLS-compliant ones) to every language that targets the CLR.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|