ASP returning very slow

  • Thread starter Thread starter TW Scannell
  • Start date Start date
T

TW Scannell

Hello,
I am just learning ASP.NET, so forgive me if this really a no-brainer error.

I have a ASP page with two buttons and a text box
Button1 simply populates a counter from a session variable. If I press it
the Session variable gets incremented and displays the value immediately.

Button2 runs a parameterized stored proc which returns 5000+, wide rows to
the text box. It returns pretty darn fast, Like about 1 second on my LAN.

The problem is if I then press button1 again, the huge amout of data in the
textbox seems to cause the page to take 10 to 15 seconds to clear and
finally display the value of my session variable. The same thing happens if
I press button2 again, I have to wait.

I assume the data is being pushed back to the server. If I put a where
clause in the SQL and only get 2 rows back, the wait is very short.

Thanks in advance
 
TW Scannell said:
Hello,
I am just learning ASP.NET, so forgive me if this really a no-brainer error.

I have a ASP page with two buttons and a text box
Button1 simply populates a counter from a session variable. If I press it
the Session variable gets incremented and displays the value immediately.

Button2 runs a parameterized stored proc which returns 5000+, wide rows to
the text box. It returns pretty darn fast, Like about 1 second on my LAN.

The problem is if I then press button1 again, the huge amout of data in the
textbox seems to cause the page to take 10 to 15 seconds to clear and
finally display the value of my session variable. The same thing happens if
I press button2 again, I have to wait.

I assume the data is being pushed back to the server. If I put a where
clause in the SQL and only get 2 rows back, the wait is very short.
You have probably enabled viewstate in the control keeping the SQL. Disable
that and I guess you should be ok?

Hope it helps [and its right ;-)]
 
Yarp, That was it. Thank yo very much

Sohail said:
TW Scannell said:
Hello,
I am just learning ASP.NET, so forgive me if this really a no-brainer error.

I have a ASP page with two buttons and a text box
Button1 simply populates a counter from a session variable. If I press it
the Session variable gets incremented and displays the value immediately.

Button2 runs a parameterized stored proc which returns 5000+, wide rows to
the text box. It returns pretty darn fast, Like about 1 second on my LAN.

The problem is if I then press button1 again, the huge amout of data in the
textbox seems to cause the page to take 10 to 15 seconds to clear and
finally display the value of my session variable. The same thing happens if
I press button2 again, I have to wait.

I assume the data is being pushed back to the server. If I put a where
clause in the SQL and only get 2 rows back, the wait is very short.
You have probably enabled viewstate in the control keeping the SQL. Disable
that and I guess you should be ok?

Hope it helps [and its right ;-)]
 
Back
Top