Ask a Question related to ASP.NET General, Design and Development.
-
Kristina Foxwell #1
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
-
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... -
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... -
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... -
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... -
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... -
Steve C. Orr, MCSD #2
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



Reply With Quote

