Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read asp.net web service file stream using Javascript

Status
Not open for further replies.
Jul 29, 2005
136
PT
Hello,

I have an asp.net web service, that is sending a filestream in a web output method.

Is it possible to read/render this file stream in a html page using javascript? I know hot to call the service using javascript. However, I want to get the filestream and read it on the fly without needing to save it on the disk.


Any example?


Thank you
 
hmmm.. I sorda do something similar .. maybe it can give you ideas to help you out.

I have a dropdown list that makes the initial web service call..
<asp:DropDownList ID="DropDownList1" runat="server" onchange="GetData()"> </asp:DropDownList>

(Note I am using AJAX)

I basically create a dataset from my web service call

Webserivce.WebMethod_GetObject()
this returns an object which I create a dataset from with that dataset I...

Dataset.WriteXML(response.outputstream)
response.end()

on the calling page I...

//Retrieve the information for the new rows

request.onreadystatechange = ReceiveRows;

request.open("GET", "AjaxGetData.aspx");

request.send(null);

In receive rows function I have...

// get the information in the XML document

var xml = request.responseXML;

var dataRows = xml.getElementsByTagName(TableName.toUpperCase());

I remove then create new data rows.. this does not sound exactly like what you are doing.. but maybe it will give idea to try

Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top