Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Taking print screen of error page in CATCH block

Taking print screen of error page in CATCH block

Scheduled Pinned Locked Moved ASP.NET
csharphelpasp-nettutorial
5 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Karan_TN
    wrote on last edited by
    #1

    hi, currently i m using asp.net 2.0 with c#. here i always redirect to an page while error occurs(in catch block). but i need to know what exactly the user enter the data(to check the error). so if error occurs, then i like to take a screen shot of the page and store inside some folder(say, errorFolder). how to accomplish. plz help me - KARAN

    Y L 2 Replies Last reply
    0
    • K Karan_TN

      hi, currently i m using asp.net 2.0 with c#. here i always redirect to an page while error occurs(in catch block). but i need to know what exactly the user enter the data(to check the error). so if error occurs, then i like to take a screen shot of the page and store inside some folder(say, errorFolder). how to accomplish. plz help me - KARAN

      Y Offline
      Y Offline
      Yusuf
      wrote on last edited by
      #2

      First of, I don't know if this is possible, but think about this, user enters some thing into the form then hits enter, off goes the page to be processed, then ooops, you trip, how in the world are you going to take the screen shot of the user display from the server? You need something on the client, don't you? Since you indicated you are catching ( and possibly logging ) the exception that may give you a clue. If you need more info, you can log user inputs as well. Since you know your form get the user inputs and don't forget input validation.

      Yusuf May I help you?

      1 Reply Last reply
      0
      • K Karan_TN

        hi, currently i m using asp.net 2.0 with c#. here i always redirect to an page while error occurs(in catch block). but i need to know what exactly the user enter the data(to check the error). so if error occurs, then i like to take a screen shot of the page and store inside some folder(say, errorFolder). how to accomplish. plz help me - KARAN

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        You do not need to take print screen for the same. You can store exception in session and then use afterward to determine the cause of error. Like,

        catch(Exception e)
        {
        Session["Error"]=e;
        Response.Redirect("Error.aspx");
        }

        HTH

        Jinal Desai - LIVE Experience is mother of sage....

        K 1 Reply Last reply
        0
        • L Lost User

          You do not need to take print screen for the same. You can store exception in session and then use afterward to determine the cause of error. Like,

          catch(Exception e)
          {
          Session["Error"]=e;
          Response.Redirect("Error.aspx");
          }

          HTH

          Jinal Desai - LIVE Experience is mother of sage....

          K Offline
          K Offline
          Karan_TN
          wrote on last edited by
          #4

          thanks jinal, currently i m doing the same. to put it more clear i got an error message "Input string was not in a correct format". this error i can fetch. but i dont know what happened. right?

          L 1 Reply Last reply
          0
          • K Karan_TN

            thanks jinal, currently i m doing the same. to put it more clear i got an error message "Input string was not in a correct format". this error i can fetch. but i dont know what happened. right?

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Find this[^] link useful. HTH

            Jinal Desai - LIVE Experience is mother of sage....

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups