| | |
Call external program from ASP.NET
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
If you want to open an external app on the client, then asp.net won't help. Asp.net is server side. When using System.Diagnostics.Process, you can open external apps, but it opens on the web server, not the clients machine.
If you want to open an app, such as notepad, on the client machine, you need to use client side scripting such as javascript. NOTE: Most of the time, this won't work unless you lossen up the security, so it's very risky.
Anyway, here's a sample code to launch apps on the client.
If you want to open an app, such as notepad, on the client machine, you need to use client side scripting such as javascript. NOTE: Most of the time, this won't work unless you lossen up the security, so it's very risky.
Anyway, here's a sample code to launch apps on the client.
ASP.NET Syntax (Toggle Plain Text)
var theShell = new ActiveXObject("Shell.Application"); var theApp = "C:\\Windows\\Notepad.exe"; theShell.ShellExecute(theApp, "", "", "open", "1");
-Mike
•
•
Join Date: Jun 2009
Posts: 1
Reputation:
Solved Threads: 0
I put :
and then
but it doesnt seem to work
please helpme.
JavaScript Syntax (Toggle Plain Text)
<script language="javascript" > function todo() { var theShell = new ActiveXObject("Shell.Application"); var theApp = "C:\\Windows\\Notepad.exe"; theShell.ShellExecute(theApp, "", "", "open", "1"); } </script>
and then
<input type = "BUTTON" value = "Push Me!" name = "Command1" onclick="todo()"> but it doesnt seem to work
please helpme.
Last edited by peter_budo; Jun 26th, 2009 at 4:04 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
![]() |
Similar Threads
- Updated : Simple ASP.Net Login Page (ASP.NET)
- Forms Authorization/ Authentication using asp .net and vb .net (ASP.NET)
- How is 3Tier architecture implemented in ASP.NET (ASP.NET)
- are C#, VB.NET, ASP.NET part of new VS.NET? (ASP.NET)
- ASP.NET, referring to a DataSet within script (ASP)
- My first attempt at ASP.NET... (ASP.NET)
- ASP.NET to Power Point (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: How to Dynamically generate web.sitemap?
- Next Thread: Changing Size of Window
| Thread Tools | Search this Thread |
.net activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# c#gridviewcolumn cac checkbox click commonfunctions confirmationcodegeneration content courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dialog dropdownlist dynamically edit expose fileuploader fill flash formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox login microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers






