J
John
I am trying to spawn a seperate process from my asp page
so when a user clicks the link or button a desktop program
is launched. This will be on an intranet and the program
will exist on the users desktop. I can use the following
code in webmatrix to run a process on my local machine:
<%@ Page Language="VB" %>
<script runat="server">
' Insert page code here
'
Sub Button1_Click(sender As Object, e As EventArgs)
Dim startInfo As System.Diagnostics.ProcessStartInfo
startInfo = New
System.Diagnostics.ProcessStartInfo()
Dim p As System.Diagnostics.Process = New
System.Diagnostics.Process()
startInfo.FileName = "c:\8133324.txt"
startInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal
p.Start("c:\winnt\notepad.exe")
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:Button id="Button1" onclick="Button1_Click"
runat="server" Text="Button"></asp:Button>
<!-- Insert content here -->
</form>
</body>
</html>
But in .NET Studio running on IIS the process doesn't
spawn. I have tried the following code:
Dim startInfo As New ProcessStartInfo("IExplore.exe")
startInfo.WindowStyle = ProcessWindowStyle.Normal
Process.Start(startInfo)
in a button click event, but nothing happens. Any help
would be greatly appreciated.
(Please send VB code, I know C# but this shop uses VB.NET
only)
John
so when a user clicks the link or button a desktop program
is launched. This will be on an intranet and the program
will exist on the users desktop. I can use the following
code in webmatrix to run a process on my local machine:
<%@ Page Language="VB" %>
<script runat="server">
' Insert page code here
'
Sub Button1_Click(sender As Object, e As EventArgs)
Dim startInfo As System.Diagnostics.ProcessStartInfo
startInfo = New
System.Diagnostics.ProcessStartInfo()
Dim p As System.Diagnostics.Process = New
System.Diagnostics.Process()
startInfo.FileName = "c:\8133324.txt"
startInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal
p.Start("c:\winnt\notepad.exe")
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:Button id="Button1" onclick="Button1_Click"
runat="server" Text="Button"></asp:Button>
<!-- Insert content here -->
</form>
</body>
</html>
But in .NET Studio running on IIS the process doesn't
spawn. I have tried the following code:
Dim startInfo As New ProcessStartInfo("IExplore.exe")
startInfo.WindowStyle = ProcessWindowStyle.Normal
Process.Start(startInfo)
in a button click event, but nothing happens. Any help
would be greatly appreciated.
(Please send VB code, I know C# but this shop uses VB.NET
only)
John