ASP returning very slow

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
 
S

Sohail

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 ;-)]
 
T

TW Scannell

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 ;-)]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top