In your Web application, you create a class to implement the IHttpHandler interface. Which code will display the Warning.jpg image in the browser whenever the handler is requested?

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
In your Web application, you create a class to implement the IHttpHandler interface. Which code will display the Warning.jpg image in the browser whenever the handler is requested?

1.public void ProcessRequest(HttpContext ctx){StreamReader sr = new StreamReader(OpenRead(ctx.Server.MapPath("Warning.jpg")));ctx.Response.Pics("pic ");sr.Close();}

2.public void ProcessRequest(HttpContext ctx){StreamReader sr = new StreamReader(_File.OpenRead(ctx.Server.MapPath("Warning.jpg")));ctx.Response(sr.ReadToEnd());}

3.public void ProcessRequest(HttpContext ctx){ctx.Response.ContentType = "image/jpg";FileStream fs = File.OpenRead(_ctx.Server.MapPath("Warning.jpg"));int b = 0;while ((b == fs.ReadB

4.public void ProcessRequest(HttpContext ctx){ctx.Response.TransmitFile("image/jpg");(_ctx.Server.MapPath("Warning.jpg"));Stream b = default(Stream);while ((b == fs.ReadByte()) != -1


More MCQS Questions and answers

R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!