Showing posts with label appears. Show all posts
Showing posts with label appears. Show all posts

Monday, March 26, 2012

How do I change a labels text (twice) in an UpdatePanel?

Hey,

I would like for a user to click an 'Add to Cart' Button, a message appears 'Adding Item to Cart ...', and then the message changes to 'Item added to Cart' when finished. I have under the AddToCart_Click event changing the label to 'Adding to Shopping Cart ...' then the code to actually add the item to the shopping cart and then changing the label to 'Item added to Cart.' However, only the last label is seen (Item added to Cart). Any suggestions on how to do this? Should I use 2 Update Panels? Or, how do I tell it to display both labels?

Thanks,
Beej

Hi

I am not sure about this, but please check Update progress or timer control from Ajax.Net. It may help you.

regards

Anuraj.P


I would suggest using the UpdateProgress component from the AjaxControlToolkit. What you specify in the ProgressTemplate tag of the UpdateProgress control will be visible during the callback, in your case the message 'Adding item to cart...'


SplashMan:

Hey,

I would like for a user to click an 'Add to Cart' Button, a message appears 'Adding Item to Cart ...', and then the message changes to 'Item added to Cart' when finished. I have under the AddToCart_Click event changing the label to 'Adding to Shopping Cart ...' then the code to actually add the item to the shopping cart and then changing the label to 'Item added to Cart.' However, only the last label is seen (Item added to Cart). Any suggestions on how to do this? Should I use 2 Update Panels? Or, how do I tell it to display both labels?

Thanks,
Beej

hi,

Subscribe to add_beginRequest and add_endRequest events of the Sys.WebForms.PageRequestManager like so:

<script type="text/javascript">
//<![CDATA[
var prm = Sys.WebForms.PageRequestManager.getInstance();
var displayLabel= $get("displayText");

prm.add_beginRequest(function(){
displayLabel.innerHTML = "Adding Item To Cart ...";
});

prm.add_endRequest(function(){
displayLabel.innerHTML = "Item added to Cart ...";
});
//]]>
</script>

hth

Wednesday, March 21, 2012

How can i Put close button inside the the popUp extender?

How can i Put close button inside the the popUp extender?

I want that when the popUp control appears there is close button on the popUp or in the panel which is extended by the popUp extender.

Once the close button is clicked the popUp control is hide. Thnks

Hi,

If you are using ModalPopup Extendar then its simple add the following property:

CancelControlID="Button1"

and for PopupControlExtender check out this:

http://weblogs.asp.net/lkempe/archive/2007/01/28/login-control-in-an-asp-net-ajax-toolkit-popupcontrolextender-with-a-close-button.aspx

thanks


Thanks... I will try it...