Link to home
Start Free TrialLog in
Avatar of Smoerble
SmoerbleFlag for Germany

asked on

C# (Urgent): messure how long a script needs

I need to know how long the execution of a script with DB connections take.

In VB it was done like this:
<html>
<%
startTime = Timer
......
// some DB connections etc...
......
%>
<%= Timer - StartTime %>
</html>


How do you do this best/most effective in C# ?
thank you
Avatar of TRUENEUTRAL
TRUENEUTRAL

That looks like ASP code (VBScript).  C# is compiled code.  You will need to use ASP.NET (in which case you can still use the VBScript you listed above)

Perhaps you should elaborate?
Avatar of Smoerble

ASKER

THanks for your comment, but I know that C# is compiled code, the question is how would you do this in C#?
E.g. I could get the startTime in the PageLoad-Event, but what are the exact classes/methods I need and how woudl you calculate the result?

thank you
ASKER CERTIFIED SOLUTION
Avatar of TRUENEUTRAL
TRUENEUTRAL

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial