I need to open a excel in web browser when click a button.how to do that in asp.net
You can't control and launch software on the client (browser) computer - why? Security.
If this was possible, hackers would have taken over all computers long ago...
Can you please explain exactly what you are trying to do? Instead of asking how to open excel from the browser, if you explain what you need to accomplish, perhaps we can come up with a better idea.
I use Google Docs Viewer for opening a wide variety of files in the browser.
Example:
http://docs.google.com/viewer?url=http%3A%2F%2Fyoursite.com%2Fyourexcelsheet.xlsx
you just need to give the url of the excel in the server
Excel
Only you can open a excel in server you can do.not in Client
You can open and control and excel file on the server side with .net, then you can write an html/javascript frontend (or silverlight) for the actions. But you cannot open the ms excel itself as a dom object etc.
Look into the excel object model for .net.
Related
I would like to know if there is a technique or solution for the follow problem.
I have a software application that is currently running inside of a Microsoft RDP session. I have some help resources built into it in which some of them open up on a webbrowser. Some of them are YouTube videos. The problem is taht through organisational policies, they cannot open YouTube clips within the RDP which connects to a interstate server.
What I would like to do is instead open up a webpage outside of that RDP connection on the local host computer instead, which does not have any restrictions like opening up YouTube webpage to play video clips.
Can you please suggest a technique, utility or solution to this problem?
Thanks,
Colin.
The nicest way to do this would probably be to create a dynamic virtual channel plugin for RDP: https://msdn.microsoft.com/en-us/library/bb540859(v=vs.85).aspx
You would have a server-side component registered to handle the protocols (http/https, I assume) you want to redirect back to the client, possibly with some filtering logic if you still want a few to run server-side (such as intranet sites); then a client-side mstsc plugin whose only job is to call ShellExecute on the URLs you pass back.
Piggybacking on clipboard redirection might be less code, but it obviously has side-effects - e.g it obliterates anything else the user might have had on the clipboard.
How can I print PDF directly to a printer with (asp.net) C#?
I actually want to print the PDF directly without showing a dialog on the server side in asp.net c#
You'll be hard pressed to make this from asp.net if the server isn't residing in the same LAN as the client and can have the same printers installed, this due to security functions inside the web browsers not allowing websites to print to a local machine. You might get a solution for this if you implement some ActiveX Component or Java applet to run this (even seen it in Silverlight, but that's going away).
Something like http://www.vbgold.com/index.shtml#AdvancedPDFPrinter might help you achieve what you're looking for.
You see I am trying to edit a file that’s in the WebDAV server, but I am doing this through ASP.NET and C# in a DotNetNuke Website. I saw the code for the Sample Server Browser
included with the ITHIT WebDAV SDK, where I saw a functionality similar to the one I require , but its a local Windows Application and it uses Process.Run() to open Word. This process will not work for my case however since that would
cause the process to be executed on the server (w3wp.exe process) and not the clients machine. My
questions is how would I implement this capability, you can take a look at their Ajax Browser for an example; right click any document and "Edit Document" appears, which causes Word to open up. How can I open a specific word document from the WebDAV
server directly into word? Am I going to have to use JavaScript? If So, how can
I pass the location of the file as a parameter?
To open a Microsoft Office documents from your web page, you will need to use JavaScript. You will need to program FFWinPlugin in case of Chrome, FireFox and Safari, or SharePoint.OpenDocuments ActiveX in case of Internet Explorer. Note that your server must be a Class 2 WebDAV server.
You can find more information here.
To open document on client side you need javascript e.g.:
<script type="text/javascript">
window.open('http://www.usability.gov/templates/docs/u-test_plan_template.doc')
</script>
This is probably the way used by Ajax Browser the problem is that then file is downloaded to local computer and when you update it, it is necessary to upload it back again.
I want to get "PrintScreen" of Client PC when he access a particular Web Page.
I tried GOOGLEing this IDEA! but was unable to get much,
Infact what i got know on stackoverflow itself is Javascript PrintScreen
JavaScript cannot be used for such functionality.
So, I would like to know can it be done in Ajax,ASP.NET with C#/VB or in PHP
because at the end i want to save this image/s continously to database either SQL Server or MySQL or Oracle.
Is this feasible by ActiveX Objects?
To my knowledge, it will be difficult to go ahead with javascript.Yet i plan to use more of client resourses than server resources while executing this functionality.
Browsers do not have access to client computer resources. What you describe there can't be achieved without a third party dll (if you mentioned .Net) installed on your computer and that can be done only on demand by the client. But the whole idea is, as stated before a privacy invasion and any attempt to install anything on the client computer will be regarded as a security threat from any AV software.
Simply NOT Possible by the why you need this ?
I don't know "JavaScript cannot be used for such functionality" before. But since you have figure it out, I can tell you that ASP.NET can't help you on this if JS can't. Because all ASP.NET at client side is javascript. Ajax things are actually working through javascript. ASP.NET just generates those javascripts for you to make your code working like a WebForm.
I have an excel stored in project folder.
i want to show whole excel,when user click on button showexcel.
once excel open, the user should have write,edit and save options also.
How about the new Excel Web App? You'll have to dig deeper about how to host this. You can test-drive for free with Windows Live Skydrive. Its a fantastic product.
general page:
http://office.microsoft.com/en-us/web-apps/office-web-apps-FX101825822.aspx
how to host:
http://technet.microsoft.com/en-us/office/ee815687.aspx