Display the clipboard information in a ASP.net - asp.net

I am having a requirement to show the data in the clipboard to the readable control.
The clipboard data may be text,document or any type. the control should display the information.
Is there any controls available in ASP.net
This is client side clipboard

You should be able to create and embed a Silverlight 2 control into your webpage. With the correct security setting this should allow you access to the clip board indirectly.
Storing text in the clipboard using Silverlight 2
Getting Started with Silverlight 2
Helpful Blog tutorial on getting started

Which clipboard are you talking about?
The server-side clipboard or the client side clipboard (I assume it to be client side).
From what I know, if you just want to display the info about what is held in clipboard - javascript has Clipboard object that you can use. It might have security constraints (As you are trying to access client side clipboard)

There is no way that the server can possibly read from the client's clipboard. So if you mean what the user has in their clipboard (at the server): it can't be done. You might be able to do some things with javascript, but then ASP.NET becomes largely irrelevant as a detail.
Alternatively, put it this way: have you ever seen this done?
Normally, to get a web-site to do something with non-text data, you need to use a file/upload control (Browse...) to send the data to the server. You might want to investigate this option.
If you need more power at the client, consider Silverlight, Flash, ClickOnce, etc (but try to avoid OCX - that is a dead technology).

It is possible to embed a .NET Windows Forms user control in a web page. Using this you might be able to access the clipboard to make the data available to your web page.
I'm not sure if this would work, for the user control will run with very limited rights, but it could be worth a try.

Related

Uploading large files in IIS Asp.net [duplicate]

I've done a good bit of research to find an upload component for .NET that I can use to upload large files, has a progress bar, and can resume the upload of large files. I've come across some components like AjaxUploader, SlickUpload, and PowUpload, to name a few. Each of these options cost money and only PowUpload does the resumable upload, but it does it with a java applet. I'm willing to pay for a component that does those things well, but if I could write it myself that would be best.
I have two questions:
Is it possible to resume a file upload on the client without using flash/java/Silverlight?
Does anyone have some code or a link to an article that explains how to write a .NET HTTPHandler that will allow streaming upload and an ajax progress bar?
Thank you,
Austin
[Edit]
I realized I do need to be able to do resumable file uploads for my project, any suggestions for components that can do that?
1) Is it possible to resume a file upload on the client without using flash/java/Silverlight?
No. The actual HTTP protocol itself does not support resume of partial uploads, so even if you did use flash or silverlight, you'd still need to use something else like FTP on the server.
I've "solved" this problem in the past by writing a custom client application in C# which broke the file down into small chunks (2meg), transmitted those separately, and then the server combines them all back together.
2) Does anyone have some code or a link to an article that explains how to write a .NET HTTPHandler that will allow streaming upload and an ajax progress bar?
While this doesn't solve the 'resume' problem, I've used SWFUpload on the client side and it worked brilliantly. It provides a smart file browser (where you can prompt the user for only jpeg files, etc) and upload progress tracking, all without needing to modify your server at all.
It's not possible to resume an upload using standard HTML file input control, because the whole file gets submitted with the HTTP request.
I've used NeatUpload in the past, which gives you a progress bar. It's under an LGPL license, so you don't need to pay for it and it's open source.
Nothing more to add about the resume problem.
I used (and keep on using) telerik radUpload and I am quite satisfied with it
(it can even be used in medium trust mode which was quite important for me). The only problem I had (and was not able to fix) is to upload files bigger than 2GB...
SlickUpload is pretty solid and a lot of big companies use it from what the site says.
This is probably too late for your project, but POW Upload have now implemented auto resume upload in their new version. We're about to implement it on our site.

Can I read and write text file using AS3?

I want to make a registration page with Flex. The data will be stored to text file. is it possible?
please help, thanks in advance.
Flex, in fact, it can read and write text files, but remember that is a client-side language, you can read and write but in the client, not in server, and you need Flash Player Version 10.0 or higher. If you need to write in the server, that as i see you need it, you need a server-language and use a remote object/webservice/httpservice or something like that to transfer the data that you want to store and let the server side make the text file.
Another alternative is use Air, but it is desktop based, not web.
Hope this helps you a bit.
If you're using Adobe AIR, then you can read and write files on the user's machine using the File class.
If you are doing something browser based, then you can write files on the user's client machine using FileReference.save, but it will require user interaction to save the file. If you have limited data, you may be able to store it as a Shared Object. You can use File.browse to get a hook to a file. It requires user interaction, though.
If you need to store data on a server, then Flex cannot help you, but most server side software that I'm aware of should be able to create and read text files on the server. Flex will need to trigger a remote service to do so using RemoteObject, WebService, or HTTPService.
Yes, as long as the file is on a web server.
With that said, it's overkill to create only a registration page in Flex. You'd be better off using html/javascript.

ASP.NET: Record Sound From A Web App?

I'm contemplating adding a voice recording to some posts on my site. I'm wondering if there is an ASP.NET library out there that will allow me to:
Press a button to start recording
Record what I'm saying through my comp's built in microphone
Save the file as a .wav or some other popular sound file
As of now, I will be the sole user of this function, but it would still be nice to have in my bag of tricks in case I want to pull it out later for a client.
It is not doable without the help of a plugin. Browsers simply don't support voice recording.
You could choose from:
Make a SilverLight applet.
The flashPlayer can record too.
find a java Applet that can do this.
Make an activeX Plugin (since you have affinity to asp)
use your os provided voice recorder, save the file and upload it. Playback via browser is easy
You solution will involve a flash componet (outside of rendering the markup that invokes the flash component). The ASP.NET stack won't be able to do it. Silverlight doesn't seem able to do it.
Here is how.
Here's the problem: the browser does not allow this level of hardware access by an application. You could however achieve this either through Java, Flash or ActiveX (Yuk! don't do it) should the end user allow the access to occur however there are a number of cavaets. Here's a great thread where like-minded people like yourself are approaching the same challenge:
http://drupal.org/node/69242
If I were cornered to do this I would create a signed Java Applet.
not directly from asp.net since asp.net is server side and you need access to the client side microphone - however the new adobe flash player has the ability to access the mircophone so in theory you could use flash to record then upload to your site.
See ListenUp sdk. I found a bulletin board called english-test.net that is using the sdk to post voices.
You'll need some client-side code to achieve this as regular HTML doesn't support audio input and upload.
The ActiveX control Active Audio Record 2.0 claims to support recording audio and uploading it to an ASP.NET web server. I've never tried it though.

How to get list of drives on local system using ASP.Net

I am going to develope a module in ASP.Net. In this module I want to get the list of drives of the local system where this page is displaying. I have already tring with System.IO.... etc. but it gives me the server drives.
I want to get the list of LOCAL drive where page is displaying on server drives.
Thank you.
Do you mean the client's computer's drives?
That is not possible.
EDIT: However, it is possible with ActiveX or a browser plug in.
This absolutely cannot be done with neither server-side ASP.NET, nor with client-side JavaScript. You can try writing an ActiveX "control" (or how are these called?) or Java applet.
Fortunately you can not do that.
This is impossible, since your ASP.Net code runs on the server. The client only sees the rendered page (HTML and javascript).
Remember: your C# or VB.Net code runs on the server for the explicit purpose of sending html/javascript to the client browser. It does not get to peek directly at the "local" system, and the only thing the "local" system knows about is the html/javascript rendered on the server. That's just how the web works.
Furthermore, javascript runs in a sandbox that does not include any way to enumerate the local drives. This is by design.
So the only way to do this is via plug-in like flash, silverlight, or activex.
You can write a .NET control which is downloaded from your website to the clients' PC and looks at the drives there. As this could be abused (you could steal the users' files) you will have to convince the user to download the control in the first place. Look here for more info:
ClickOnce Deployment overview

How to capture image from client webcam in asp.net

I am working on an ASP.Net application and I want users to be able to take a picture with their local webcam and then upload it to the server.
I can, of course, rely on users doing this manually via their locally installed software, save the image as a file and do a normal file upload. However, what I really want to do is incorporate it all into a UI in the browser.
I know this means accessing local resources so do I need an ActiveX control or Silverlight or is there something I could do in Javascript for example?
This is initially intended for an Intranet app so I can have control of the client's environemnt, including stipulating the browser etc, which means I can use an ActiveX control if I have to. However, it would be nice if I could write this in a generic way so it could be used in an internet app generally (happy to stipulate that it only works on Windows clients but would be good to get it to work in FireFox).
Thanks.
The only acceptable and universal way to this for now is Flash/Flex application. Flash player presets literally in every browser in the world and all of them has such capability.
VideoCap Pro is quite popular, and it offers an ActiveX version, have you checked it out?
This sounds very suspicious to me. You realize the nefarious applications this could be applied to, right? A web page that when a user browses to it, unknownst to them, their webcam snaps a pic of them. ... I don't like it.
You could use the Nimbb API to do the webcam video recording inside a browser.
It is possible to get the image from client webcam in asp.net, you have to install the Silverlight 4 with Visual Studio 2010:
Go to following link:
http://wildermuth.com/2009/11/23/Taking_a_WebCam_Photo_with_Silverlight

Resources