| | |
Call external program from ASP.NET
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
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 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# cac checkbox class commonfunctions compatible content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv formatdecimal formview gridview gudi iframe iis javascript listbox menu microsoft mouse mssql multistepregistration nameisnotdeclared news opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers






