Any suggestions for a nice ASP.NET Ajax tooltip? - asp.net

I am looking for a nice tooltip control (with delay) in ASP.NET AJAX. I know there are many nice Javascript libraries out there, but since I am already using ASP.NET AJAX, I may just as well use that.

An "oldie-but-goodie" that I have used many times for tooltips would be overlib It's quite nice, VERY flexible and can be used independent of any particular AJAX platform.

Telerik seems to have the mojo in this area, but since I assume you're looking for free...
The nicest ones appear to be jQuery plugins, like this one:
http://rndnext.blogspot.com/2009/02/jquery-ajax-tooltip.html
There is also this ASP.Net AJAX TooltipExtender:
http://weblogs.asp.net/cjdevos/archive/2008/03/29/asp-net-ajax-tooltipextender.aspx

I was able to make a pretty nice balloon popup using the PopupControlExtender from the ASP.Net AJAX Control Toolkit. You can specify the target control to invoke the popup, the control or div that contains the popup content, and you can also dynamically populate the content using an AJAX callback to a service method.

I recommend:
Pure JavaScript with Ajax capability:
Menucool Tooltip
ASP.NET version, with Ajax Load On Demand:
Menubasic Tooltip
If you don't need the Ajax feature, Menucool has a very easy-to-use CSS tooltip either.

One option is WZ_Tooltip. Most tooltips are basic javascript; you should not expect to find much in the way of .NET integrated tooltips, since there is not much reason to use it rather than just using a javascript.

Related

Using jQuery-AJAX to page ASP.NET datagrid

Does anyone have, or could point me to, an example of using jQuery to page through an ASP.NET datagrid control?
I would like to page through a large set of data displayed by an ASP.NET DataGrid control however I would like to avoid a page refresh and hence want to use AJAX to get the new sets of data. I would also like to avoid the ASP.NET AJAX toolkit and would like to do it all using jQuery-AJAX. Thank you.
The DataGrid is a server side control that relies on postbacks. jQuery and AJAX are client side technologies. Write a AMSX or WCF service to serve up your data and consume it with jQuery. You can use jQuery templates to make things easier. Or wrap the DataGrid in an UpdatePanel and you will have the poor man's AJAX(sometimes called AJAH).
There may be a jQuery plugin to help with this.
Here's a nice article to get you started:
Easily build powerful client-side AJAX paging, using jQuery
Try using jGrid, it´s free, but there are commercial dotnet implementations available.
It´s quite powerfull,you can do almost everything with it. And loading your data is easy to. But, you have to forget the Idea of aspnet datagrid, unless you will use updatepanel(which is very stable and usefull and has nothing to do wiht asp net ajax toolkit)

Alternatives to modal popup extender in asp.net?

I have a modal pop extender that has a user control in it, I use it in several forms in a
ASP.NET 4.0 project.
I am not very happy with the js code that it produces and the mess in the markup :/
So, any worthy alternatives that can be controlled from the codebehind easily :) ?
Having been down the road of Ajax Control Toolkit, I would recommend moving on to jQuery or some other javascript framework. While I understand the desire to "control it from codebehind," because it seems easier at first, trying to wrap client-side functionality in a server-side control usually is more trouble than it's worth.
Even in the simplest case, the the amount of javascript code needed to create a modal popup in jQuery (e.g.) is less than with Ajax Control Toolkit MPE. For example, I like the jQuery plugin SimpleModal. The code to turn a div into a modal popup using SimpleModal with default options is this:
<script type="text/javascript">
function showPopup() {
$('#<%=popupDivID.ClientID %>').modal({ appendTo: '#aspnetForm' });
}
</script>
Then you can just add that function to a click event, for example. And it's about a thousand times more flexible.
If you just don't like embedding javascript in your markup files, you can still technically control this all from codebehind by using ScriptManager to register the scripts and add events to controls.
Have you looked at the Ajax Control Toolkit on CodePlex. Ajax Control Toolkit It has several very useful controls that are very easy to implement. The toolkit includes a modal popup control as well as a popup control. In the link I gave you are all the instruction on how to download and use the toolkit.
Another option if you have access to it is Telerik controls. Their Ajax controls include what they call a radWindow which also works very well. You can read about it here. The drawback to Telerik is it is quite expensive.
I have used both and they work very well.
Use jQuery Dialog UI as this would likely give you the best supported option. It supports modal behavior.

Replacing ASP.NET Ajax controls with jQuery

I have a solution that uses Accordian and tab controls, amongst others.
Is it worth swapping these out and use the jQuery controls instead?
What are the benefits? Is it best practice to load one tab at a time with data?
There are obviously benefits to using both, but in my experience if you are using ASP.NET then you are going to find the (I'm assuming you meant Ajax Control Toolkit) the ASP.NET controls better if you have a requirement for data-binding or have a high tendency to utilise your server execution time a lot.
IMO if the current controls meet your requirements then there isn't a breaking reason to switch to the jQuery controls, some ASP.NET server controls that provide Ajax functionality can be quite heavy-weight and cumbersome, but I've found controls like the Accordion to fit my needs perfectly, and wouldn't see a need to switch unless it wasn't flexible enough.
I had to make this swap in some test on my projects, from ASP.NET Ajax controls to jQuery controls, and my only issues was the UpdatePanel's.
ASP.NET take care the UpdatePanel messages (when you make asynchronous calls), but if you going to change it with jQuery you need to take care this updates by yourself - if you use UpdatePanel.
Update.
I agree with the comments for the UpdatePanel. I was working on a project, that had already many upadtePanels, and we just started to change some things to see what and how. If you build it up from the beginning I agree that it's better to avoid UpdatePanel, and do it with jQuery.

jQuery UI + ASP.NET UpdatePanel - Is it worth it?

I really like the looks of jQuery UI and I'd love to integrate it into my ASP.NET Web Applications. I like the themes and how easy it is to use the widgets. I'm currently using AJAX Control Toolkit controls like the Calendar and ModalPopup. I'm hoping to replace them with the DatePicker and Dialog widgets, but I hear they have issues with UpdatePanels. There are workarounds for these issues, but I wonder, is it worth it?
Which leads into my question(s):
Has anyone had luck using jQuery UI widgets exclusively (instead of AJAX Toolkit Controls) in an ASP.NET Web Application that occasionally uses UpdatePanels?
Are there any best practice resources for getting jQuery UI and UpdatePanels to play nice?
Update:
Based on the answers so far, it seems that the best thing to do is replace UpdatePanels with $.ajax and PageMethods. That should allow me to use jQuery UI without any issues and also improve my AJAX performance.
No, it's not worth it. If the toolkit's calendar and modalpopup extenders are working for you, then just hold on to them.
In future projects, stay away from asp.net ajax and use jQuery exclusively. This way you wont run into any of the updatepanel problems. ASP.NET 4.0 Webforms are going to make using jQuery much easier in the past, because you will have more control of how controls get named when they are rendered to HTML.
We use Microsoft AJAX (only using UpdatePanels) and jQuery and all works great.
Using UpdatePanels makes all UserControls, Postbacks, Viewstate etc work as you would expect with the UI enhancements of jQuery. There are a few things to learn in getting them to work together and until we find an alternative we will continue to do this. We think its worth it.
I would be keen to see how UpdatePanels can be easily replaced with jQuery, but I expect one would need to write additional code for each UpdatePanel replacement, rather than letting asp.net handle things? Are there any articles out there that demonstrate replacing UpdatePanels that contain asp.net controls and UserControls with events etc?
I'm working on a project with a lot of UpdatePanel and jQuery, things just work fine.
Yes, it is a period when you need to learn, to make things work.
If you have a lot of UpdatePanels and you don't want to remove them then this is understandable, and using jQuery is just improving the UI, so it's not going to much worse.
Also jQuery has functionalitys related to AJAX,so you can make elegant client side coding with jQuery which is not related to Design and ui stuff.
I think if you search for jQuery and Ajax on the internet you will find a bunch of good examples, and fine techniques to both technologies together.
PS:
Remenber that UpdatePanel is evil in sort of way when you are using in an inappropriate way.
UpdatePanel is (and generally AJAX) is very customizable, make time for yourself to optimize it
Good luck!

ASP.NET code inside Google Maps info window

Clarification:
Put simply, I'd like to put an ASP.NET UpdatePanel inside the info window of Google Maps. This would mean that users could interact with my application from within an info window, without refreshing the page and without closing the currently open info window.
Does anyone know if this is possible?
Update:
Thank you to all those who have so far responded. Very much appreciated.
What I have gleaned from the answers is that:
the update panel has it's own "mysterious mechanics" which might be causing the UpdatePanel to not work correctly inside the InfoWindow. Going down the more direct route of using JQuery to make ajax calls to simple web services should eliminate the hidden complexity of the UpdatePanel and enable the functionality I want.
I am still intrigued as to why the UpdatePanel approach does not work, and as to why using one would "break the model" of Google Maps, when surely an UpdatePanel merely renders as HTML and javascript with a link to the XMLHttpRequest object.
Is it possible to place ASP.NET code inside Google Maps info window?
I'd like to place an UpdatePanel with some AJAXified asp:Button's inside the info window.
AFAICT you simply provide the HTML to place in the info window as a string, so was thinking of rendering a UserControl to a string and placing that string in the info window for the browser to render. Does anyone know if this is likely to work?
If this is not possible in Google maps, does anyone have any idea whether such an implementation would be possible with the corresponding Virtual Earth technology?
José Basilio is right. Instead, use $jquery Live Events and put regular HTML in the Info Window then use Ajax calls with jQuery to get the interactivity you want. Reframe the problem.
VirtualEarth has tigether integration with SilverLight, which should mean that you'll have greater .NET control over your web mapping application. With most Google Maps implementations that we've done we typically just use pure HTML/JavaScript/CSS solutions to create AJAX functionality. Thus we would inject HTML/javascript into the InfoWindow class, for any custom functionality that we needed.
Consider another approach and possibly. What you are really looking for is to be able to respond to a server side event. Maybe something like this if you really and truely need to respond to server side events.
http://windyroad.org/2006/07/25/event-driven-ajax-part-1-pushing-server-side-events/
Once you are handling the events on the client in javascript you can do whatever you like to the map
I'm not sure I'd take this approach, but if you want to get ASP.NET code within an info window, you could use an iframe.
Alternatively have you considered an ASP.NET control such as GoogleMap Control, which would handle all the integration for you?
Rich
UpdatePanel != AJAX. Take a look at using jQuery to make Ajax calls ($.ajax) and creating simple web services/etc. to achieve what you're after. While technically you could wiggle an UpdatePanel into there somehow, it just isn't worth it.
Look here for an excellent example on calling AJAX/web methods with jQuery.
Have you looked at the ExtInfoWindow control? Since you did not state your problem, I can't say whether it is a solution, but it seems that it should be mentioned here.

Resources