Start external process from ASP.Net

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Start external process from ASP.Net

    Hello:
    I am currently having problems with an ASP.NET page...I've never
    programmed in ASP or HTML so all of this is new to me.
    I have a table that contains a list of files. The columns are a Document
    Description, the Filename (with the application extension) of the document,
    and a button that will say "View Document". When the user clicks on a
    button, I have pull up the document in the application it belongs to. I will
    need to pull up documents for Word, Excel, Project, etc....For example, if I
    click a button to view an Excel document, I have to start Microsoft Excel
    and pull that document up. I'm dynamically creating the table so I can't use
    the <asp:button> tag in the aspx.vb file...or can you? How do I bind each
    button to a separate document? Do I need <input type = button> instead? Is
    there any way to do this?

    This is what I currently have in the Form.aspx.vb file to define the button:

    'add a button to the table cell
    objCell.Text = "<input type='submit' name='btnView'
    onClick='ViewDoc_Click()' value='View Document'>"

    ViewDoc_Click( ) will go to the database and retrieve the full file path,
    and then call another procedure to start the external application.

    I'm new to ASP, HTML, & ASP.NET...any help would be greatly appreciated.

    Thanks,
    Kristina Foxwell


    Kristina Foxwell Guest

  2. Similar Questions and Discussions

    1. Start external Process under different user account in ASP.NET???
      Does anyone know how to get Process.Start() to use the security context of the user that my ASP.NET app is impersonating? It seems that it is...
    2. Accessing network files from an external process
      Here is a good problem I'm hoping someone can help me with. Let me start out with my configuration. I have an asp.net application, integrated...
    3. Process.Start() - Works on DevBox but not on Server...
      Situation On a Windows 2000 workstation a web service using System.Diagnostics.Process. Successfully executes .exe and returns. On Windows 2000...
    4. Process.Start in a web service
      When an ASP.NET app calls Process.Start(), is the resulting process run under the same user as the ASP.NET app? My situation is an ASP.NET app...
    5. Fetch a external process.
      Hello All I'm completely new to ASP.Net. I need to write a page to fetch an external call which actually call a Java program to download a...
  3. #2

    Default Re: Start external process from ASP.Net

    Have each button go to a special download page. Pass the Image ID on the querystring, so it looks kind of like this: [url]http://localhost/myproj/download.aspx?FileID=43[/url]

    Then in your download.aspx have some code similar to this:


    Dim dr As System.Data.SqlClient.SqlDataReader


    Response.Clear

    cmdGetFile.Parameters("@File_ID").Value = _ Request("FileID").ToString

    dbConn.Open()

    dr = cmdGetFile.ExecuteReader


    If dr.Read Then

    Response.ContentType = dr("ContentType").ToString

    Response.OutputStream.Write(CType(dr("FileData"), Byte()), _

    0, CInt(dr("FileSize")))

    Else

    Response.Write("File Not Found.")

    End If



    Here's more info:

    [url]http://www.aspnetpro.com/features/2003/07/asp200307so_f/asp200307so_f.asp[/url]



    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]





    "Kristina Foxwell" <kfoxw1@jcpenney.com> wrote in message news:O8YAWBuRDHA.2020@TK2MSFTNGP11.phx.gbl...
    > Hello:
    > I am currently having problems with an ASP.NET page...I've never
    > programmed in ASP or HTML so all of this is new to me.
    > I have a table that contains a list of files. The columns are a Document
    > Description, the Filename (with the application extension) of the document,
    > and a button that will say "View Document". When the user clicks on a
    > button, I have pull up the document in the application it belongs to. I will
    > need to pull up documents for Word, Excel, Project, etc....For example, if I
    > click a button to view an Excel document, I have to start Microsoft Excel
    > and pull that document up. I'm dynamically creating the table so I can't use
    > the <asp:button> tag in the aspx.vb file...or can you? How do I bind each
    > button to a separate document? Do I need <input type = button> instead? Is
    > there any way to do this?
    >
    > This is what I currently have in the Form.aspx.vb file to define the button:
    >
    > 'add a button to the table cell
    > objCell.Text = "<input type='submit' name='btnView'
    > onClick='ViewDoc_Click()' value='View Document'>"
    >
    > ViewDoc_Click( ) will go to the database and retrieve the full file path,
    > and then call another procedure to start the external application.
    >
    > I'm new to ASP, HTML, & ASP.NET...any help would be greatly appreciated.
    >
    > Thanks,
    > Kristina Foxwell
    >
    >
    Steve C. Orr, MCSD Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139