Advertisement
Guest User

Untitled

a guest
Sep 30th, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.26 KB | None | 0 0
  1. using System.Web;
  2.  
  3. namespace SimpleHandlerAndModule.Handlers
  4. {
  5.     public class SimpleHandler : IHttpHandler
  6.     {
  7.         public bool IsReusable => false;
  8.  
  9.         public void ProcessRequest(HttpContext context)
  10.         {
  11.             string fullHtmlCode = "<!DOCTYPE html><html><head>";
  12.             fullHtmlCode += "<title>Custom Hander and Module</title>";
  13.             fullHtmlCode += "<meta name=\"viewport\" content=\"width=device-width\" />";
  14.             fullHtmlCode += "<link type=\"text/css\" rel=\"stylesheet\" href=\"Content/Styles.css\" />";
  15.             fullHtmlCode += "</head><body>";
  16.             fullHtmlCode += "<div class=\"row\">" +
  17.                 "<div class=\"column\"><img src=\"https://5.imimg.com/data5/KD/NT/MY-6975226/rubik-cube-7x7x7-puzzle-educational-toy-500x500.jpg\"></div>" +
  18.                 "<div class=\"column\"><img src=\"https://5.imimg.com/data5/KD/NT/MY-6975226/rubik-cube-7x7x7-puzzle-educational-toy-500x500.jpg\"></div>" +
  19.                 "<div class=\"column\"><img src=\"https://5.imimg.com/data5/KD/NT/MY-6975226/rubik-cube-7x7x7-puzzle-educational-toy-500x500.jpg\"></div>" +
  20.                 "</div>";
  21.             fullHtmlCode += "</body></html>";
  22.  
  23.             context.Response.Write(fullHtmlCode);
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement