, email, c#, framework 3.5


i have developed one application. i have designed three forms.

1) for sending email

2) for importing data from excel sheet.

3) for inserting and retrieveing bulk records to sql server2008.

whenever i do any process/task on this form. i want to disable submit button until the process gets over.

kindly suggest me how to do this. (with and without use of ajax).

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

why can you not use ajax  (just curious)

This snippet may help  :)
ronipatsAuthor Commented:
example in above link works fine. Here thread is used. Now how to calculate the total processing time for (sending email - as it may vary based on internet speed)
(for reading excel file - as it may vary based on no of records in file) and (for inserting and retriving record in sql server).

here in above example time of 1000 ms is give in thread to get sleep. How can i calculate processing time in all above three case.
to answer your questions its simple trial and error

MAIL travels over 3000 miles per second over the internet
I would think 10-15  seconds should suffice

reading an excel file I would use a timer to see how long its taking then add a couple seconds for good meaure

same  instance with SQL server in regards to how fast the query returns a record and add a couple seconds for good measure.

Im glad the solution worked
Please award points :)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.