Asp.net Timer control tweaking on the client side

Hi,

Few days back I saw this question in the forums and from then I was looking for an answer for it. The Timer control in the asp.net Ajax is pretty useful when we want to do some activity on the client side at a certain interval of time. The control also gives us good control on tweaking it on the server side. But Sometime the requirement is such that we want to change the value of timer interval, or stop the timer on the client side itself.

A few days back I learned that the timer control can easily be tweaked in the client side also. Let’s assume we are using a timer control with ID Timer1.

 

var Timer1 = $find(‘<%= Timer1.ClientID %>’);

 

Continued...

Executing JavaScript function after update panel has updated

Hi,

Last week I was working on a project and integrating AJAX to some existing code base. I had two small requirements. I wanted to run different JavaScript function once the server side execution is finished.

I had one function which was needed to fire after and or every update panel update, and some other JavaScript function to fire on specific update of update panel.

To execute a JavaScript function after any and every update panel update we can use the following code.

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(foo);

This will make the JavaScript function foo() to fire after every update panel update.

Continued...

Asp.Net Ajax Extension new List Search Extender

Hi

Another of the new controls in Asp.Net Ajax extension is the new ListSearchExtender. The List search extender helps us to search inside a list box or a dropdown list while the user is typing the characters. This can be a very good functionality if you have a list box with many values in it.

An incremental search is performed within the list box or the dropdown list based what has already been typed so far. The message displayed when the user clicks the list can be customized with the help of css class position.

We use the TargetControlID to define the dropdown list or list box the extender should work on. The prompttext property is used to define the text prompted when the control gets focus. We can also define the position and css class for the prompt message.

Thanks
Vikram


Using Asp.Net Ajax extension for incremental page display

Hi

In this post I will show you how to use the incremental Page fetch using the Asp.Net Ajax. This is very important if you want the user to e shown some part of the page and then to populate the other part of the page subsequently. With the help of the Asp.Net Ajax this is very easy.

First we need to create a web service that will return the Html that will be displayed. For this Example I have taken a web service that returns a string that will be displayed in the div. Here we must remember to put the System.Web.Script.Services.ScriptService() with the class since the webservice will be accesed by the javascript proxy.

Now we need to write some javascript code in the page were the data will be fetched after the page load and displayed.

Continued...

How to use Tab Extender to use multiple tabs without postback

Hi

One of the very useful new extender in the Asp.Net Ajax is the tab control. This control is useful when you want to show the date in tab format without causing the postback when the user navigates from one tab to another.

A TabContainer is a host for a number of TabPanel controls. Each TabPanel defines its HeaderText or HeaderTemplate as well as a ContentTemplate that defines its content. The most recent tab should remain selected after a postback. The extender also maintains the Enabled state of the tabs after the postback

While using the Tab Extender we need to define the Tab Container and multiple Tab panel inside the tab container.

Continued...

How to show SharePoint type menu using the dropdown extender of the Asp.net Ajax extension

Hi

The drop down control of the asp.net Ajax extension is a really cool control. It shows some button on the mouse over and allows user to click on the button. Dropdown is an ASP.NET AJAX extender that can be attached to almost any ASP.NET control to provide a SharePoint-style drop-down menu.

The displayed menu is just a panel control. The dropdown gets activated on the click (Both left and right) of the attached control. There is also a cool animation effect on the mouse over of the attached control.

The dropdown extender has two main properties. The TargetControlID is the ID of the control that will show the dropdown. The DropDownControlID is the Id of the control, which will be displayed as the dropdown. This is normally a panel.

Hope this helps
Thanks
Vikram


Using the calendar control with its built in Animation Feature.

Hi

Calendar control is one of the most required client controls in the web development. This extender can be attached to any textbox. It provides client-side date-picking functionality with customizable date format and UI in a popup control. The animation while choosing the year, month and date is really cool.

By clicking on the title of the calendar you can change the view from Days in the current month, to Months in the current year. Another click will switch to Years in the current Decade. This action allows you to easily jump to dates in the past or the future from within the calendar control.

Continued...

AlwaysVisibleControl in the Asp.Net Ajax extension for showing a control even when user Scrolls

Hi

Another very cool control of the Asp.Net Ajax extension is the AlwaysVisibleControl. As the name suggest always visible control is always visible in the page. This is really helpful if you have a long scrolling page and you want some Part of the page to be always visible.

The main properties of the extender control are TargetControlID. This spifies the Control that will be always visible. Typically this will be user control. VerticalSide property can be either Top Middle or bottom. This property is used to define where the control be docked on the vertical end. Similarly HorizontalSide property takes Left, Center or Right as a paramater and defines where to dock the control horizontally. The VerticalOffset and HorizontalOffset property defines distance from the edge of the browser in pixel. We can also define the duration in seconds of the scrolling effect of the control. By default this property is set to 0.1 Second.

Continued...

How can we use the new beta version of the ASP.Net Ajax

Hi

Microsoft has released their new ASP.NET AJAX Beta release. With this version the Micorsoft.web.ajax.dll is installed in the GAC. So that means we do not have to keep the dll in the Bin folder. But this is a real big problem for people like me who use shared hosting. The hosting provider may not be kind enough to install this version on the server. Which means that I cannot upgrade and use this version.

Why did not Microsoft provide us with the dll. Putting the assembly in the GAC is a good thing but it can be a problem for many. They should have allowed people to have the option to run the assembly from the bin folder also

Continued...

providing suggestion of words in thesearch box from a list in the text File

Hi

So I have continued added more and more Ajax to the site. Now I have added Auto Suggest Box to the site. The search box on the left has been made into an auto suggest box. Although the numbers of words at present are not very high but with the word manager ready it should be a matter of time when I will have many words to the auto Suggest in the search box.

Adding Auto suggest box using Atlas (Microsoft ASP.NET Ajax extension) was very easy. You need a web service (returning the list of words), the autocompleteextender to show the panel and a text box. The webservice is required to return an array list.

The code to use the autocompleteextender is very simple

<Atlas:autocompleteextender id="AutoCompleteExtender1" runat="server">

Continued...

Using Atlas Accordion Control to display multiple panel with one panel visible at a time

Hi

Accordion is a web control that is used to display multiple panel with one panel visible at a time. Its like have many collapsible panel where only one is visible at a time. The Accordion is a web control and has accordion pane. Each pane can have its header and content. This control also remembers its state during the post back. To fit the variety of layouts its support 3 auto size modes (None, Limit and full).

The control also support being data bound with its datasource and databind methods.

The code to use the Accordion looks like this.

Continued...

Using Atlas UpdatePanelAnimation Extender to get "watermark" behavior

Hi

UpdatePanelAnimation Extender is a simple and very good up gradation of the Update Progress. It allows declerative fashion and us to use the powerful animation framework in a very easy. We can use the Update panel Animation extender to play animation both while the update panel is updating and also when the update panel has finished updating. This can help us interact with the user while there is a call back in process and we can use the existing Animation framework to provide users with good interactivity while the call back is in process and also when the call back has completed.

The code to use the UpdatePanelAnimation Extender looks like this.

Continued...

Using Atlas TextBoxWatermark Extender to get "watermark" behavior

Hi

TextBoxWatermark is an "Atlas" extender that can be attached to an ASP.NET TextBox control to get "watermark" behavior. We can also add custom CSS and a message in the textbox when the textbox is empty. And the Watermarks go away once a user has typed in some text in the textbox. The textbox extender can we used efficiently when we want to show user some more information on what this textbox is for without cluttering up the rest of the page.

The code to use the TextBoxWatermark Extender looks like this.

Continued...

Using Atlas ModalPopupExtender for displaying Modal content to the users
Hi
Earlier there was no way to show a Modal pop-up to the user in ASP.NET. The Atlas’s ModalPopupExtender allows the display of content in a modal manner (A modal pop-up stops the user interaction with the rest of the page till the modal pop-up is there. The content of the modal pop-up can be any number of control and HTML with CSS applied to them.
When the modal pop-up is displayed the user can only interact with the modal pop-up content. When the interaction with the pop-up completes then only the user can interact with the rest of the page. Custom script and post back can take place when the user completes the interaction with the modal pop-up.

The code to use the ModalPopupExtender looks like

Continued...

Using Atlas FilteredTextBoxExtender for the convenience of users

Hi

Validation User input is very important in the Web. Although ASP.NET has a rich set of validation control we some time want to prevent a user from entering any invalid characters.

Lest say, we have a textbox control where the user needs to enter the number of products he will buy. We can always validate the value that he enters in the text box but the best thing would be if we do not allow him to enter any thing other that numeric value in the textbox.

We have a new extender in the ATLAS toolbox for such requirement (FilteredTextBoxExtender).

The code to use the FilteredTextBoxExtender looks like this.

Continued...

Using Atlas ConfirmButtonExtender to display confirm messagebox

Hi

One of the good things about using ATLAS (ASP.NET Ajax extender) is that it makes most of the JavaScript get done without using a single line of java script. The same is true if you want to display a message box to the user when he clicks on a button (lets say a delete or a update button). If the User clicks on the ok button then only the button functionality is performed normally otherwise the button does not perform its normal submit functionality.

The extender can be used with Normal Button, Link button or an image button. The code to use the ConfirmButtonExtender looks like this.

Continued...

Some good images to be used in Update Panel
Hi

I found some cool Links which provide some useful images that can be used with the update Panel control. Check these out

http://mentalized.net/activity-indicators/
http://www.napyfab.com/ajax-indicators/
http://www.ajaxload.info/

Hope this helps
Thanks
Vikram

play animations both while an UpdatePanel is updating and after it has finished updating

Hi

If you want to show the users some animation with the Update panel is calling back, the new UpdatePanelAnimation control is what you need. To make this work we will have to use the UpdatePanelAnimationExtender. The full code to make the animation is given below.

Continued...

Using Atlas to add animation to your site

HI

A new toolkit of ATLAS has released. The Latest thing in Atlas’s great collection of control is Animation. So that’s what I tried my hand upon first-up. You can use the Animation control to add animation to your website. I have added a little animation to the site and will be adding more. There are two new buttons in the left bar “Animate the Left Bar” and “Animate the Main Blog”. When you click the button you will see animation on the site on the left button and the main blog respectively. I should thanks (Farghana again) for the color for animation. This is my first look at the Animation. I will be adding more animation to the site.

Continued...

How to Use Collapsible panel in your webSite

Hi

I have added some Ajax technology to my site. The left bar is having quite a few panels so I decided to make those panel Collapsible. Having worked with ATLAS before I knew how easy it would be to do this work.

All I had to do was add the CollapsiblePanelExtender to these panels. This extender targets any ASP.NET Panel control. The panel is also post-back aware so in case of post back the panel remembers it state

Continued...

How to add Atlas controls to you toolbox and getting started with them Video
Of  late a lot of people have asked how to add Atlas control to the toolbox. These are 2 good video's that I found that shows exactly how to add Atlas controls to your toolbox and getting started with it.
Hope this Helps
Thanks
Vikram
 
Copyright © 2006 - 2008 Vikram Lakhotia