There are a number of ways...is this simply for testing purposes? You can
turn tracing on in your page directive <%@ Page Trace="True" ...%> and do
something like:
Page.Trace.Writ e("START");
CallYourFunctio nHere();
Page.Trace.Writ e("END");
and at the bottom of the page you'll see the START and END as well as how
long it took.
Alternatively, you can profile your code using a tool such as Red-Gate's
(
www.red-gate.com) ANTs Profiler (full 14 day free trial)...or there are
other free ones...which should really give you deep analysis.
Finally, if you need this in more of a production scenerio, you can use
something like:
DateTime start = DateTime.Now;
CallYourFunctio nHere();
TimeSpan ts = DateTime.Now.Su btract(start);
//use ts.TotalMillise conds to get the total amount of time it took..
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"TomislaW" <to*********@ho tmail.com> wrote in message
news:em******** ******@TK2MSFTN GP14.phx.gbl...
how can I calculate time needed for execution of my methods in asp.net
app?