How can i use javasrcipt or xmlhttprequest to get the image outputed by an aps.net web page?

How can i use javasrcipt or xmlhttprequest to receive the image outputed by an aps.net web page?

the webpage like this

 protected void Page_Load(object sender, EventArgs e)
    {
        string strQueryFileName = Request.QueryString["filename"];

        string strLocalPath = Server.MapPath(path);
        Bitmap  theReturnImage = new Bitmap(strLocalPath);

        theReturnImage.Save(ms, ImageFormat.Jpeg);

            theReturnImage.Save(ms, ImageFormat.Jpeg);

            Response.ClearContent();

            Response.ContentType = "image/jpeg";

            Response.BinaryWrite(ms.ToArray());
        }

        Response.Flush();
        Response.End();
    }

0
hackbabu
8/17/2007 5:49:05 AM
asp.net.client-side 24353 articles. 2 followers. Follow

1 Replies
1068 Views

Similar Articles

[PageSpeed] 7

 Not exactly what you are looking for, but similar

http://www.eggheadcafe.com/articles/20010824.asp 

 


Regards,
Prashant


Dont forget to click "Mark as Answer" on the post that helped you.
0
Prashant
8/17/2007 6:21:05 AM
Reply:

Similar Artilces:

How can i use javasrcipt or xmlhttprequest to get the image outputed by aps.net respones's stream?
Hi: I have an ImageService.aspx web page. It accept an file name then return the image file by write it to the response's stream. like this   protected void Page_Load(object sender, EventArgs e)    {        Bitmap theReturnImage = null;        string path;        string strQueryFileName = Request.QueryString["filename"];        string strLocalPath = Server.MapPath(strQueryFileName );      ...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

How to get HTML Source of web page opened by web browser using vb.net
hello friends,         i have opened an web browser in vb.net using the below code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim nullObject As System.Object = 0 Dim str As String = "" Dim nullObjStr As System.Object = str Windows.Forms.Cursor.Current = Cursors.WaitCursor Dim i As Int16 For i = 1 To 2 AxWebBrowser1.Navigate("http://www.google.co.in/search?hl=en&q=test&meta=", True) AxWebBrowser1.Document. Next Windows.Forms.Cursor.Current = Cursors.Default End Sub  ...

How to get new web app to use .NET 2.0 on Win2K server using .NET 1.1 as default framework?
I have .net framework1.1 and 2.0 on our server running win2K. i have existing applications that uses asp.net 1.1, i also have a new app that use ASP.net 2.0.  how can i set my new .NET 2.0 app to point to asp.net 2.0 without messing up my existing .NET 1.1 apps? To specify the ASP .Net version fro a web application, do the followingIn IIS Manager select the web application -> Properties -> ASP.Net TabSelect  ASP.Net version you want to use for the applicationRegards,PrashantDont forget to click "Mark as Answer" on the post that helped you. But I am running Win2K...

How to get the HREF value of the Anchor tag in a web page using the web browser control in vb.net
Hi Friends,               i have a webserver control in my application.i load the web browser control on a button click using the below code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click                AxWebBrowser1.Navigate("http://www.rateitall.com/i-322335-.aspx", False) End sub once the page is loaded in the browser i want the <a> HREF value in that page.For example if that page has ...

Implementing .Net Form into an APS.net web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an ASP.net web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

Can a .NET 1.1 page execute in a .NET 2.0 web site?
I've got a ASP.NET 1.1 web site to which I would like to add some ASP.NET 2.0 web pages. Could I just change the web site to point to the 2.0 .NET version and still have the .NET 1.1 web pages work so that both versions are in the same web site? Have you some of you approached this? Thanks. The official answer is maybe It's not officially supported, but most ASP.NET 1.1 pages will run fine under ASP.NET 2.0.  Officially you should run the upgrade wizard on your 1.1 pages. This is a  pretty good blog entry.      JamesMy Blog: http://www.wintersfamily.plus.c...

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

Can Non-.NET Web Service Clients Use Datasets?
If a .NET-written web serice returns a dataset, can a web service not written in .NET use that dataset? If not, what should be returned? thanks in advance, Geoff I would return a string (in xml format possibly) - you could probably just return DataSet.ToXML() as the return value How about creating an object to represent each row in the dataset and then putting it into an array?...

can't get javascript to run in APS.NET pages
I am coding a site that has a main page containing two frames. The left frame contains a treeview control, and the right frame will be used to display the properties of the objects selected in the treeview. My code is as follows: index.htm1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">2 <html xmlns="http://www.w3.org/1999/xhtml" >3 <head>4 <meta name="vs_defaultClientScript" content="JavaScript" />5 <meta name="vs_targetSchema" content="http://schemas.microsoft.c...

Paging in AP.NET/VB.NET
Hi All, Well... a simple problem perhaps regarding paging in an asp.net application using vb.net. I have a datagrid named dgResult and being trying to implement paging on it.  Following is the code to capture the PageIndexChanged event. Sub dgResult_PageIndexChanged(ByVal sender As Object, ByVal e As DataGridPageChangedEventArgs) Handles dgResult.PageIndexChanged dgResult.CurrentPageIndex = e.NewPageIndex GetProperData() End Sub I have a break point at dgResult.Curre.... position.  The datagrid, just do not accept the method and I can not event trap the event using a break ...

How can i create get values from Opened page in client side to my first page(server page)
i have a little bit problem that my Server page has coding like this : btn.attributes.add("onclick()",getdata()) and one text box is txt1 now when user clicks it Button btn then getdata function  executes ok client page function getdata(){ response.redirect("hello.aspx") } now on hello.aspx has 1 textbox txt2   now what ever the data has been inputted by user in (client side textbox) txt2 i want to assign it to txt1 (server side )conrtol on server pls help me send me code ...  Jay "Enjoy Life" When you do the redirect from Page #2 back to Page...

Help! Can anybody tell me if I can use Visual Studio.NET to develop Web application at my home using Windows XP Home Edition?
Can anybody tell me if I can use Visual Studio.NET to develop Web application at my home using Windows XP Home Edition? I downloaded Web Martrix. But I don't want to use its IDE. I just want to use its webserver because Home Edition can't have IIS. Thanks.HeiGe Visual Studio.NET neededs IIS, But in home addition you can't use IIS. So in XPHome you can't use Visual Studio.NET from ASP.NET development!Sreedharhttp://www.w3coder.orgweblog http://weblogs.asp.net/skoganti Thanks for your answer. But I have successfully added IIS to my XP Home. Special thanks to Holeinone, Pippo a...

When to use client side varidation and server side varidation in .net?
In .net or classic web application we can varidate user data either on client isde or server side. How to select which side varidate to be used? Thanks! Generally, I use both client and server validation. I make sure the input is in the correct format and reasonably valid on the client, then I verify the data on the server. The extent of validation also depends on the type of data that I need to validate.Here are a few references:Validating ASP.NET Server ControlsIntroduction to Validating User Input in Web FormsClient-Side Validation for ASP.NET Server ControlsSecurity Checklist...

Web resources about - How can i use javasrcipt or xmlhttprequest to get the image outputed by an aps.net web page? - asp.net.client-side

XMLHttpRequest - Wikipedia, the free encyclopedia
Data from the response can be used directly to alter the DOM of the currently active document in the browser window without loading a new web ...

Native XMLHTTPRequest object
Hello, I’m Sunava Dutta and I am a Program Manager in the Internet Explorer team. I’m excited to mention that IE7 will support a scriptable ...

function daten2() { var a; //- if(window.XMLHttpRequest) { a - Pastebin.com
function daten2() { var a; //- if(window.XMLHttpRequest) { a - Pastebin.

CodeSOD: MacGyver's XMLHTTPRequest
In these days of browser standards, it’s easy to forget that once upon a time, simple tasks like an HTTP request from JavaScript were difficult ...

JavaScript - XMLHttpRequest functions
This is the XMLHttpRequest function I always use; see quirksmode.js ,the script file that's used in every page on this site. It is presented ...

Help I am getting an XMLHttpRequest exception of Access-Control-Allow-Orig
When working on a demo application recently I was trying to get an ajax call to hit one of my Web API routes and I was immediately hit with the ...

Joshua Odmark (@JoshuaOdmark) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

YouTube API Blog
Web developers are accustomed to making magical user experiences with a few lines of elegant JavaScript, but when faced with talking to RESTful ...


A Brief History of Ajax (Aaron Swartz's Raw Thought)
New technology quickly becomes so pervasive that it’s sometimes hard to remember what things were like before it. The latest example of this ...

Resources last updated: 12/3/2015 12:19:10 PM