Google Search

Google
 

Sunday, July 13, 2008

Video: How Do I: Use the ASP.NET AJAX ToggleButton Extender?

Presenter:Joe Stagner

Demonstrates using the ToggleButton extender control to modify the behavior and appearance of the standard ASP.NET CheckBox control to enhance the user interface.

The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video


Minute 0

This video you for a standard ASP net checkbox controls into interesting graphically based on the buttons is in the talk about extender that ships as part of Microsoft execs control toolkit so this drive will create a new Ajax control toolkit website for the videos on a grab some images that I can use in his applications don t just haven t images folder on my desktop at all at my solution editing is because the talk about extender turn to checkbox into a control that dynamically shows one of two images based on the checkbox saw the checkboxes state whether it s checked or not checked sex Subaru our designer for the default aspx page will begin by adding an update panel tour page sofa going to Ajax extensions tools that run update panel that would go back up to my standards tab for my standard is to a control s first human is a graphical glitch

Minute 1

Boxes so one an end to show them to add a text box that when the user is made this looks as if it don t make them that we give they can invoke some server side action and then it will at a label so that that server side action can return a result set and then we ll select the checkbox city ago lets slip the first checkbox lets set the check status equal to true and change its text value to be a link ASP net and at select checkbox number two and

Minute 2

Its text and then will make it a selected by default as well and also the button control here was good change the button control to its say submit village should change the label obit notes change the text in the label to say okay now let s add a couple of cover about extender controls one for each checkbox that we wanted

Minute 3

To toggle button so got to the Ajax tool to have in and out towards the bottom we have toggle button extender lets add one that just tells us we already have the to locate DLL in our application and to talk about extender s and our ready to go and configure them let s start by choosing the first time about extender and select the control ID notably at the checkboxes because toggle button extender controls are specifically designed to extend a aesthetic checkbox controls so tell about extender one will extend checkbox one and to extend checkbox to make sure that both of those real ballots for in situ resource mode and here we can find

Minute 4

Allies the configuration of our extenders so the first thing we want to do is do I specify the size of the image that can be displayed select an image height and width and in our case the images or reuse are a 19 pixels so on site image hopes image height and image with equal 19 that s not specify exactly what those images are so let s say that the own unchecked image URL is images or we drop an image on the images directory into her solution so we re going to start would be a toggle unchecked the file and then we can specify what the check

Minute 5

That URL is going to be and and that s going to be the toggle button checked via file that you specify here is how we want the the checked and unchecked and text to be so let s specify with the check image alternate text is to be human just to make a do everyone a cake now is go ahead and grab

Minute 6

All of those image and text parameters along with my height and width and copy goes into the second checkbox parameters now than he did do it as we want to influence the server side of showers this is a strictly speaking part of the use of the toggle button etc but what is at this as an example of what you might do based on the song a lot double click on the submit button to implement a little bit code behind and that I simply got some some VB code misunderstood check each of those boxes if they re checked and if they whether there that based on whether or not their check to add some strength so you said you like its veto on his feet like MS execs and the like in a syntax and then return of the compound values bridges built to the label text so I think nothing special about that surveillance ahead and run

Minute 7

Application and see how much slicker using checkboxes are toggle buttons on how much slicker using graphical toggle buttons are than using standard checkboxes so you don t hear from their green because he said they were set by default if we uncheck them return to read check of after integrating so I misled us using a red and green images you can use things like thumbs up thumbs down our really know go stopped her in a whatever you whatever you like but it s a great way to add that using some defiles to add real sort of intuitive context sensitive user selected your webpage and video and Clackamas don t submit button we get the execute logic on the back of the server that s it that s it s that easy to add these context sensitive graphical toggle buttons to your ASP net application using the toggle button extender control the ships of the Microsoft Ajax control toolkit

Click here to go to original video page

No comments: