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. How to retrieve response time to each request made in my ASPX page?

How to retrieve response time to each request made in my ASPX page?

Scheduled Pinned Locked Moved ASP.NET
questionwcfsysadmintutorial
2 Posts 2 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.
  • R Offline
    R Offline
    Rock Star
    wrote on last edited by
    #1

    Hi, How can I retrieve the list of all the request I made it to server with respect to time required to process time for it. For ex: In my page I am using some web services. I want to retrieve list of all the web services I am using and time required to process this request. How can I do this. Thanks & Regards Rock Star

    R 1 Reply Last reply
    0
    • R Rock Star

      Hi, How can I retrieve the list of all the request I made it to server with respect to time required to process time for it. For ex: In my page I am using some web services. I want to retrieve list of all the web services I am using and time required to process this request. How can I do this. Thanks & Regards Rock Star

      R Offline
      R Offline
      Rutvik Dave
      wrote on last edited by
      #2

      If this is for performance troubleshoot then i.e. On that method which you want to troubleshoot add a Label called lblResponseTime on the page somewhere and do the following on your method

      protected void cmdSearch_Click(object sender, EventArgs e)
      {
      DateTime responseStart = DateTime.Now;

              // Your existing code for this method here...
      
              DateTime responseEnd = DateTime.Now;
              TimeSpan responseTime = responseEnd.Subtract(responseStart);
              lblResponseTime.Text = responseTime.Seconds + ":" + responseTime.Milliseconds;  
      

      }

      this will calculate response time taken for that action.

      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