Like AJAX, but not AJAX

When a user submits a page, i want the submit button to be disabled the text be something else like [ Loading.... ] and when the page loads after post back , the button should be enabled and the text  be [ Submit ]. Is it possible to do this without AJAX in
Noob Rocks
2/6/2007 12:54:03 AM 91979 articles. 4 followers. Follow

7 Replies

Similar Articles

[PageSpeed] 20
Get it on Google Play
Get it on Apple App Store

You will need to use javascript. One way you can do it, add this attribute in the page_load event:

Button1.Attributes.Add("onclick", GetPostBackEventReference(Button1) + ";this.value='Please wait...';this.disabled = true;");

This does have its limitations, but it should work.
2/6/2007 1:06:34 AM

Are you trying to avoid the full page PostBack?  If that is the case you will not be able to avoid AJAX, but you do not need the full ASP.NET AJAX framework.

To do this without the framework you can just use a simple library like jQuery which is compact and easy to use.

Here is a sample to do what you are suggesting.  The handler (genericaHandler.ashx) should set the content type as text/xml so the response can be used as an xml document.

<script type="text/javascript" src="jquery.js" />

function handleOnSubmit() {
  $ajax(url, function() { handleResponse(); }
     url: "genericHandler.ashx",
     processData: false,
     data: xmlDocument,
     success: handleResponse


function handleResponse(data) {
  // use the data


<!-- button here -->
<div id="loading" style="height: 0px;">Loading...</div>


Brennan Stehling
2/6/2007 1:21:58 AM
May i know what are the limitations here?
Noob Rocks
2/6/2007 1:24:04 AM
no validation of the the page.
2/6/2007 1:28:32 AM
no page validation.
2/6/2007 1:30:43 AM

Are you trying to avoid the full page PostBack?  If that is the case you will not be able to avoid AJAX, but you do not need the full ASP.NET AJAX framework.

 The full pages does postback...but all i want to do is control the button properties during the postback/page re-load event possibly even a processing image.

 But i dont want any AJAX solutions

Noob Rocks
2/6/2007 5:34:46 AM

Or you can look at this link


Mark post(s) as "Answer" that helped you

Electronic Screw
2/6/2007 6:11:26 AM

Similar Artilces:

How do I get started with AJAX.Net?
Hi All, I'm a seasoned developer but have not yet ventured into atlas et al.  I prefer books, but will take whatever I can get if it's good and will get me going. Any recommendations? Thx in advance. Jeff try here first then learn from sample and docJames Wu (MIB426).NET is only way to goMCP, MCSE, MCDBA, MCSD, MCAD I find the materials online display features and implementations but are lacking architectural depth, and am seeking more comprehensive resources. By architectural depth, I mean that I cannot watch ...

ajax or not to ajax.
Heres a strange one for you. I have a textbox, a button and a gridview on a page. I enter some search text which returns 500 odd records in under a second. When i wrap the gridview in an updatepanel, set its update mode to "conditional" and the trigger to the button the page can take 2-4 seconds to render. I think the problem is down to page redering some how as my progress indicator stops at around the same time as the normal postback would appear. I have also noticed this very behaviour and have come to the conclusion that in cases like this it is better to hand code a XMLHttp...

To AJAX, or not to AJAX?
Some body suggested to me to use AJAX. I figured it's not the brand name detergent nor the Dutch city. So here is what I have and please tell me if it ca be done with ajax, and perhaps point me to some examples, etc. The page contains several GridViews and FormViews that display data using several data calls. (Yeah, there is my first issue. Need to figure out how to cash all that.) This is an application that track work orders, so the top most FV has the user info and summary information of the work order. It is editable and so far it works well. There is also another set of infroamt...

My AJAX is not AJAXing!
Hi, I was having trouble with a new AJAX enabled code so I tried to just to do a simple test page. I did the simple Label control with button example covered in this tutorial I'm having the same problem. Functionalitw-wise it works but the page is refreshing and flickering. That means it's not the code but maybe my set up. I'm using VisualStudio 2005 and the application is currenty .NET 2.0. In VS.NET, I do see the AJAX controls though. What could this be?Thanks,Sam did you install the Ajax extensions? Now, it's AJAXing!...

I have an application without Ajax and I would like to add Ajax controls to it but get scriptmanager error
Hi, I have been working on an application. I started it without Ajax but I would like to add some controls so I downloaded Ajax Extentions and the Ajax Control Toolkit, I have configured my Webconfig so it supports Ajax by adding the code below. But when I add a control on one of the forms I get an error, I also added a scripmanagerproxy on that website and added a scriptmanager on the sitemaster which is being used by all the other pages. But I am extremely confused as to what I have to add and where? I can't seem to find an example or document that explains what you have...

AJAX 1.0 RC Getting started #1 Does not work for me an Ajax newbie
Great I thought I have a couple of hours to start using AJAX I have VS 2005 and am familair with ASP.NET 2 Went to Downloaded ASP.NET AJAX 1.0 RC  - as per the instructions Followed Scott Guthrie Video Developing ASP.NET Applications using AJAX ..... They did not work the syntax is different - it msut have been for an older version  Went ot the "How Do I Section " run  "#1 DOw Do I Get Started with ASP.NEt AJAX" 'UPDATED for AJAX RC" - 2 controls, 1 button and 2 labels - IT DID NOT WORK ! - It compiled etc but both times updated ...

Starting an Application in .net
i am new to could any one give me simple ajax,net example so that i start building on my ajax skills please.........  I started with the todolist video on the main page, and its all you need to know to get started. Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.    ...

Getting Ajax Error when not using Ajax
VWD 2008 Express.  Visual Basic. "All of a sudden" I am getting the following error when I try to load a particular page in my site: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Access is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileLoadException: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. Acce...

how to get started with AJAX
hi Every1, i'm completely novice to AJAX, so i dont know how to get started. i've installed Ajax Exetsions from, then control tool kit. now i want to work with controls like accordion etc but i've visual web developers & i'm trying to add reference to ajaxcontroltoolkit.dll but in vain i'm getting error saying there was error loading types from assembly. could someone please guide me. regards, satish.Kind Attn: If a reply to your post helped you, kindly mark it as Answered.__________________________________________________Please save Animals Help World Society Fo...

Getting started with AJAX
i've had a look at a couple of websites detailing it but what i'd really like is a good book that i can work through learning about AJAX and its capabilitiesso anyone any reccomendations on good AJAX books out there??Cheers,Craig I would suggest picking up a book on javascript first before going into AJAX straight away, you will need to make sure that you know who to manipulate DOM.  There is a book that I have read from book will show you a sufficient amount of detail to use AJAX, then you could go for a generic book on AJAX i....

From where i have to get start in Ajax ?
Hi all, I want to start working on ajax in 2.0 what i have to to for getting start in Ajax using 2.0 any help or some useful links are highly appericated . Best Regardslife is name of learning!Mark as an answer if it helps Rameezwaheed: Hi all, I want to start working on ajax in 2.0 what i have to to for getting start in Ajax using 2.0 any help or some useful links are highly appericated . Best Regards Download AJAX Extensions and for the tutorials here as Answer if this reply helps youMVP ASP/AS...

Getting started with Ajax
 Hi - I am trying to get started with Ajax but cant seem to get it working.  I have visited the Ajax website but it's not clear (to me at least) how to get up and running.I am using VS 2008 and have applied all the updates - could someone tell me (in a nut shell) how to get started and what I need to do?Thanks in advance,James jparry:Hi - I am trying to get started with Ajax but cant seem to get it working Hi, Can  you let  us  know  as to  what  you  want to  achieve  using  AJAX ,   in  that  way ...

Getting started with Ajax
I have Visual Studio 2008 standard. I have created a Ajax web site before -- several weeks ago. In order to get rid of problem that I had uninstalling Mvc beta I took VS2008 off of my system. Now, when I go into (create) new website I find the following list: Asp.Net Web Site, Silverlight Script Web, Asp.Net Web Service, Empty Web Site, WCF Service, Asp.Net Reports Web Site, Dynamic Data Entries Web Site, Dynamic Data Web Site. When I go to the About dropdown of VS 2008 it says the following: Microsoft Visual Studio 2008 Version 9.0.30729.1 SP1 and on the otherside Micros...

Canot get a basic AJAX like site to run, seems to use .net 2.0 instead of 3.5
Hi all, I have downloaded VWD 2008 and installed 3.5 of the .net framework I start a new web site and when i run it i get the following: ************************* Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Type 'System.Web.UI.UpdatePanel' does not have a public property named 'TextBox'.Source Error: Line 13: <div> Line 14: <asp:UpdatePanel ID="UpdateP...