Username Availability Validator AJAX Control, Release Demo

by mosessaur| 04 January 2009| 13 Comments

Back in September last year (2008), I posted a demo about Username Availability Validator Control. This control developed by the community on a contest initiated by Dave Ward on August 2008 as I remember. At that time the control was in beta.

On October 2008 the control was released to public on its first version. And finally I wrote a a very simple documentation on the project Wiki.

In this post I am going to update my previous demo as well as provide new feature on the control which is SuccessMessage property to be displayed if the Username is available. This update is not available so far on project at CodePlex. This is a private update which I provided on this post only. [View Demo]

More...

Apply Expand All and Collapse All to Collapsible Panels in ASP.NET AJAX and jQuery

by mosessaur| 22 December 2008| 17 Comments

I got many feedbacks in my previous posts "Building a grouping Grid with GridView and ASP.NET AJAX toolkit CollapsiblePanel" & "GridView Grouping Master/Detail Drill Down using AJAX and jQuery"  asking to for toggle all (Expand All or Collapse All) feature in CollapsiblePanelExtender as well as to in jQuery. Actually I didn't have much time to walkthrough this and provide a demo about it.

Today I got a chance to write few code snippet to run this feature. It was very simple for both jQuery also for ASP.NET AJAX.

More...

Tips & Tricks when working with jQuery and ASP.NET AJAX

by mosessaur| 17 November 2008| 7 Comments

I posted about how to build and extender control using ASP.NET AJAX with jQuery. During my work I fall into few issues that I resolved and wished to share them with you.

These issues are related to callback functions in jQuery. For example when calling slideUp(speed, callback) or slideDown(speed, callback). Same thing when calling each(callback) function except that the callback in each(callback) function takes 2 arguments while those in Effects functions take no arguments by default -refer to jQuery documentation for more details-.

What are the issue exactly?

In all callback function in jQuery, "this" keyword will reference the DOM Element. For example in slideUp or slideDown functions if you specified a callback like this:

//Collapsed is your callback function
$('#elementId').slideDown(Collapsed);

Your callback function Collapsed should look like this:
function Collapsed() {
  //"this" refers to dom element
}

Now if you used "this" keyword in the callback function context it will reference the DOM Element which you are sliding down or up or making any kind of effects on it.

More...

Building jQuery and ASP.Net AJAX Enabled Controls, The jQueryCollapsiblePanelExtender Part 2 Server Control

by mosessaur| 27 October 2008| 10 Comments

In the previous part I talked about how to build the client control. In this part I'll show how to put it all together to build an ASP.NET AJAX Enabled Server Control. You can view the demo that demonstrate control usage here.

The good thing about ASP.NET AJAX is that it supports fully programmable interface for both Server and Client control. And make a connection between both control. So you just need to put the control declaration on the ASPX page and ASP.NET will make it work for you. On the other hand, you have full access to the client APIs so that you can do some manual calls to the client APIs as well.

Building the Server Control:

This is an ASP.NET AJAX Extender control. Means it extends existing ASP.NET control to enable ASP.NET AJAX on it. In this case this extender extends ASP.NET Panel control, that is why it is called CollapsiblePanelExtender. Here is an article to show you in details How To build Extender Controls.

Basically jQueryCollapsiblePanelExtender I am building here inherits directly from ExtenderControl. This required to implement 2 methods GetScriptDescriptors and GetScriptReferences which I am going to explore later. But now, I want to take your attention that I am using jQuery, and I wanted the developer to have the option to specify the path of the jQuery library. If he/she did not specify the path, the default path is used, which is the the one hosted by google at http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js. To do that I made a property and Call jQueryScriptPath that gets and sets jQuery javascript library path.

More...

Building jQuery and ASP.Net AJAX Enabled Controls, The jQueryCollapsiblePanelExtender Part 1 Client Control

by mosessaur| 26 October 2008| 13 Comments

At the end of the last month (September 2008) Microsoft announced that it will be shipping jQuery with Visual Studio going forward. It was a great news for all ASP.NET developers who are jQuery fans as well as jQuery and ASP.NET AJAX folks like me. Before and after that, there were many posts made around the same subject. It will take a full post to list all these posts. But it would be easy for me to list ASP.NET jQuery heroes around such Rick Strahl, Dave Ward and Matt Berseth. There are many other heroes around such as Bill Beckelman who made a great collection of ASP.NET with jQuery Demos.

For specific posts around ASP.NET AJAX and jQuery I recommend to refer to the following posts by Dave Ward's blog:

Introduction:

We all heard about and maybe worked with ASP.NET AjaxControlToolkit! A set of wonderful controls, but they are heavy, maybe not all of them but many of of them. Beside they require lots of script files which increase the response size.

I was thinking of building jQuery UI Widgets to clone some of AjaxControlToolkit controls. And after Microsoft announcement about jQuery I had another idea! I always liked how ASP.NET AJAX component model, both client and server models. It is easy to build ASP.NET AJAX Enabled Controls especially for ASP.NET control developers. ASP.NET AJAX client and server architecture really ease the development ASP.NET AJAX Enabled Controls and also the core ASP.NET AJAX client library has no massive performance issues, and it is widely used.

On the other hand, I loved the ease of using jQuery as well, how fancy it provides UI Effects and manipulation of DOM. Many many things I wished to have in ASP.NET AJAX were exist in jQuery. So I though of building an ASP.NET AJAX Enabled Control to clone the existing AjaxControlToolkit's control CollapsiblePanelExtender. And use ASP.NET AJAX client and server component model while using jQuery for UI Effects. In this case it would be collapsing (Slide Up) and expanding (Slide Down). [View Demo]

More...

Username Availability Validator almost ready, the early demo

by mosessaur| 19 September 2008| 15 Comments

UPDATE: ALWAYS DOWNLOAD LATEST SOURCE CODE FROM PROJECT PAGE ON CODEPLEX

Few weeks ago Dave started the Advanced ASP.NET AJAX Server Controls book giveaway contest. And yesterday he announced that the control is almost completed, but the contest door is still open. So I thought to grape the bits and start testing it and build a simple sample. [View Demo]

The sample that I am going to demonstrate here will use ASP.NET Create User Wizard control with UserName Availability Validator. In this sample I'll show the important properties of this control as well as the current issues exist.

Prerequisites:

I'll assume that you already know how to configure and use the existing built in ASP.NET Membership provider. You'll need a sample database with ASP.NET Membership services installed on it.

The sample provided has ASP.NET Membership already installed and configured, you can download the sample and start explore it.

You page must have ScriptManager control on it, of course this is an ASP.NET AJAX control at the end.

More...

Master\Detail with CollapsiblePanelExtender and edit detail with HoverMenuExtender using GridView

by mosessaur| 08 September 2008| 10 Comments

Last year, Matt posted a cool post about . Last month I got an e-mail from Justin Riggs, he was trying to combine to things. The usage of HoverMenuExtender as described in Matt's post, and the I posted about few months ago.

He already made the sample which ease the job for me in this post, but he had and issue that the functionality wasn't work properly. So I fixed that and thought to share it here in case anyone would love to apply same feature. You can view demo here.

It is a must that you return to by Matt, and Building a grouping Grid with GridView and ASP.NET AJAX toolkit CollapsiblePanel by me before you go a head in this post.

screen01 screen02

More...

New Article: Building On Demand Loading Master/Details using GridView, CollapsiblePanelExtender and ASP.NET Ajax PageMethods

by mosessaur| 06 August 2008| 16 Comments

Well, I'm done with this article that show in details how to build on demand loaded details from master data using GridView and CollapsiblePanelExtender control. Read the article.

Earlier this year Matt Berseth posted about Building a Grouping Grid with the ASP.NET 3.5 LinqDataSource and ListView Controls. Then I followed his post with 2 other posts discussing same idea but with different implementation:

Later I got few comments about how to implement that using AJAX, in order to display the details data on demand. At that time Dave was demonstrating the usage of jQuery AJAX on his post Using jQuery to consume ASP.NET JSON Web Services. So I came up with another demo to apply on demand loading of details data in my post GridView Grouping Master/Detail Drill Down using AJAX and jQuery.

Again I got few other comments on how to apply same approach, but using ASP.NET AJAX Control Toolkit CollapsiblePanelExtender control. So here I'm going to provide how to do that using CollapsiblePanelExtender and ASP.NET AJAX PageMethods call to apply on demand loading of details from the master data. You can read my article and view Demo here.

Comments can be left on this post as currently pages feature of BlogEngine.Net doesn't support comments.

Simple Static Tooltip Widget using jQuery.UI

by mosessaur| 02 August 2008| 17 Comments

I've seen different type of tooltips around. And actually jQuery tooltip plugin was one of the best I ever seen. And then I thought to build some tooltip similar to those tooltips available on asp.net learning items. Just simple one to be displayed on left or right of the tooltiped item (element). And I decide to build that using jQuery.ui widgets.

Very simple and straight forward, all I needed is the following:

  • A tooltip fully UI customizable to be displayed to the right or left of the desired element. And it should detect if the desired element is closer to right or left on the screen; so the tooltip to be displayed correctly to the right or left of the element.
  • Ability to control when the tooltip to be displayed, on hover or focus on the element or manually using tooltip widget methods such show and hide.
  • Callback upon on show and hide of the tooltip.
  • Optional fancy show/hide animations.

Tooltip01 Tooltip02

I built a sample which you can download to demonstrate how this tooltip should work and you can view the demo here.

Before go through the code, I recommend first to read the following posts:

More...

jQuery.UI Messenger\Outlook like message notification Widget

by mosessaur| 16 July 2008| 25 Comments

Today, Matt posted a cool progressbar widget using jQuery.UI. He gave a good introduction and explanation about how to build a widget using jQuery.UI.

Here, I'm following his sample to build my own one, which is Messenger\Outlook like message notification [view demo]. So for reference and how to build one please return to jQuery.UI ProgressBar Widget by Matt Berseth.

Messenger like message notification widget is something I wished to do long time ago, and was lazy to think and code it, because I thought it would take to much coding. And I read Bilal's article How to Show Messenger-Like Popups Using AJAX but it wasn't a reusable component. So I just used his styles for demonstration.

After going through Matt's post, I decided to build it up right away. So Let's dive into the code. Below is the init method for the widget, I just initialize some local variables with to store current bottom position and height of the popup message element.More...

Popup Master-Detail using GridView, DetailsView and JQuery with jqModal

by mosessaur| 08 May 2008| 34 Comments

Introduction:
Last month Matt Berseth posted very good post about how to build Master-Detail with the GridView, DetailsView and ModalPopup Controls. Today I'm going to clone his post and build the same feature using jQuery with jQuery Plugins; one for popup windows jqModal& and the other is for Color Animation. You can view a demo of this sample here [View Demo].

Prerequisites:
Because I'm using some design tips and styles posted in Matt's posts, I recommend to return to his original posts regarding styling and UI enhancement. I used the styles and design shown on his post Building a VS2008 Styled Grid with the GridView Control.

In my sample I'm using UpdatePanel, and used a client side technique to update the UpdatePanel. To read and review more about this technique please read Dave's post Easily refresh an UpdatePanel, using JavaScript.

It is important also to review documentation of jqModalas I'm not going to explain its APIs.

Implementation:
To make a long story short, I just modified Matt's sample and replaced ModalPopup control of AJAX Control Toolkit with jqModal. Also Matt used to indicate the updated row by setting a style sheet class to the updated row for certain period of time then remove it to make it look as before. I did the same, but I used some kind of animation provided by Color Animationplugin for jQuery.

MProduct Detail Modal Popup  Product List after Update with Indicator

More...




GridView Grouping Master/Detail Drill Down using AJAX and jQuery

by mosessaur| 19 April 2008| 96 Comments

Introduction:
Last month I posted about Building a grouping Grid with GridView and JQuery. And I got feedbacks about how to do the same thing using AJAX (on demand retrieving of detail data). In fact I was thinking of that too, and I had couple of ideas in mind. One of them it to use nested update panels, or use AJAX Data Controls with page method/web service method calls along with ASP.NET AJAX. You can view the [demo here].

I didn't like the nested update panel idea, although it is the easiest I think. And was started to think about the second idea but I was about to check another way other than ASP.NET AJAX as long as I'm using jQuery. So I was thinking of using jQuery AJAX. That was just after reading Dave Ward's post Using jQuery to consume ASP.NET JSON Web Services.

GridViewDrillDownJQueryAjax00  GridViewDrillDownJQueryAjax01

More...

GridView jQuery Plugin Row MouseOver And Click Styles

by mosessaur| 30 March 2008| 3 Comments

Last year on October, Matt Berseth wrote few posts about improving styles of GridView, these posts are the following:

Last month, I posted a revised version of his work using Script#. And in this post I'm going to show that same features can be applied using jQuery. And I was really amazed by the simplicty and less of code that I had to write to get the same feature on hand.

I've implemented this using jQuery plugins. So I had to author a plugin and I can call it very simple one as the idea was already done and I had it on my head. I'm not going to explore how jQuery plugins can be authored, but you can return to the following links:

You can view demos here [demo 1] & [demo 2]. I will start from the end, on how to use the plugin. Actually it is very simple, all you need to do is to add this JavaScript line to your code when the page, or as a startup script. I did that using onLoad event of the ASP.NET AJAX Application as I have ScriptManager installed on the page:

$(selector).gridviewex(options);

For example:

<script type="text/javascript">
function pageLoad(s,e)
{
    $('#gvProducts').gridviewex({hasPageRow:true,dataRowClass:'row',altDataRowClass:'altrow',
                                rowHoverClass:'rowhover', rowSelectClass:'rowselect',
                                cellHoverClass:'cellhover',cellSelectClass:'cellselect',
                                columnHoverClass:'columnhover'});
}
</script>
This will initialize the GridView with the style needed. It worth to mention that you can use this plugin with any Table based HTML.

gridviewjqueryplugin00 gridviewjqueryplugin01

More...

GridView with Select All CheckBox using JQuery

by mosessaur| 25 March 2008| 18 Comments

One of the handy features that one might with to put on GridView is the Select All checkbox which is similar to the one on Hotmail and Yahoo. You click the checkbox on the header and all items (checkboxes underneath) get checked. [View Demo]

I've seen several implementation for this feature long time ago. Myself wrote one. And all solutions were using some good amount of JavaScript. Today I was thinking, why not revisit the idea again, but this time using all mighty JQuery.

And as expected, the amount of code used to implement this simple feature is really small. I'm going to explore the JQuery code expecting you already know ASP.NET and how to use GridView along with SqlDataSource.

My GirdView looks exactly like this one:
GridView With CheckBoxes

More...


Displaying Row Details Tooltip on GridView using JQuery

by mosessaur| 14 March 2008| 25 Comments

Continuing exploring JQuery! I decided to implement a feature to display some kind of details related to a row displayed on GridView. For example when displaying employees details on GridView some information might not fit in the GridView because it will make it huge and wide. These infomration can be diplayed as Tooltip. Or when you want to display a picture and some kind of formated text to be diplayed as tooltip when mouse hover on the image.

My sample here will show how to implement such feature using JQuery. Again, I'm using same data and designed presented in my previous posts:

  1. Building a grouping Grid with GridView and ASP.NET AJAX toolkit CollapsiblePanel.
  2. Building a grouping Grid with GridView and JQuery.

I'll display customer orders as tooltip. of course so much data to be diplayed as tooltip, but this is just demonstration [View Demo].

jquerytooltip

More...