CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Saturday, September 02, 2006

How to Using Shell execute in asp.net, C#, VB.NET

How to Using Shell execute in asp.net u can use the follwing syntax which is an equivalent to Shell in VB
System.Diagnostics.Process.Start(strpath) 

Post a Comment

Nanku said...

Thanks for the tip.

Aris said...

Hi, Thanks. the same code works the same in vb.net windows application.

Emmanuel said...

My name is Emmanuel (eyan@aueb.gr).
Does anyboby know why the following does NOT work?

Protected Sub removeDirByForceX(ByVal dirX As String, ByVal errorX As String)

' Remove a directory, after copying a dummy file in it.
' It is assumed that the calling program has ensured that dirX exists.
' The directory to be deleted is in the application folder.
' The routine is called from an ASP.NET application.

Dim dirX_FP As String = Server.MapPath(dirX)

FileCopy(aDummyFile, dirX_FP & "/000-Dummy-file.txt")
Try
Directory.Delete(dirX_FP, True) ' delete dir and all subdirs in it
Catch ex As Exception
errorX = "ERROR: " & ex.Message.ToString
Exit Sub
End Try

errorX = ""

End Sub