views:

713

answers:

7

Hi! I'm working with masterpages and after reading a lot of answers I can't find why my calendarextender doesn't appear

Here is my code

http://pastebin.com/m789f935e

A: 

Have you tried changing the TagPrefix in the

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

directive to something other than asp? Not sure how well referencing more than one assembly for a single TagPrefix is supported.

The info here and here sort of backs me up...sort of. Give it a shot and let us know how it goes.

Chris Shouts
still doesn't show
rebor
A: 

I see you have more than one ScriptManager tag... one in the Master page and one in your VerFavoritos.aspx page. I suggest you add one ScriptManager in the Master, place it right after the tag and before anything else in the Master page. Remove any ScriptManager tags from the VerFavoritos.aspx page.

Hope this helps.

Ricardo
I removed the ScriptManagerProxy from the .aspx page and I placed the ScriptManager in the .master just after the form (I can't put it before because it gives an error) but the calendar didn't appear
rebor
Do you see a JavaScript error in the browser when loading the aspx page with the calendar extender control? if so, please paste it here so we can look at it. Also, the link you provided to your code shows what I believe is an outdated copy of it, please update so we can see what you currently have.
Ricardo
+1  A: 

did you check the setting in the webconfig file . do you have all the required settings for ajax . ?

mnu
mmm...I don't think I need special settings in my webconfig for working with ajax, what exactly settings do you mean?
rebor
If you don't have an ajax-enabled web.config, the AjaxControlToolkit, ScriptManager, or UpdatePanels will just not work. Sounds like this is the issue.
Kant
A: 

Do you have the AJAX Control Toolkit .dll in your References?

The entry in the web.config you are looking for is something along this line:

<add assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagPrefix="AjaxControlToolkit"/>

When this happens you can use the calendar extender with syntax like:

<AjaxControlToolkit:CalendarExtender ... />
Stephen B. Burris Jr.
A: 

Rebor.

My application have a page that displays a ModalPopUp (the modal pop up pf ajax toolkit). Inside the PopUp i put a calendarExtender, but the calendar appears behind the PopUp, so, to solve it i need to associate my Calendar to a CSS, like this:

                                    <cc1:CalendarExtender ID="txtProximoContato_CalendarExtender" runat="server" PopupButtonID="imgCalendarProxContato"
                                    Enabled="True" CssClass="CalendarPopup" TargetControlID="txtProximoContato">
                                </cc1:CalendarExtender>

and the CSS class

.CalendarPopup

{ z-index: 10500 !important; }

I dont know if it is your problem, but i hope this help you

Ewerton
A: 

To be honest the Ajax Control Toolkit has been superceded by things like jQuery. Seriously consider using jQuery UI or extjs instead - I've always found this library to buggy and badly supported.

James Westgate
A: 

I copied/pasted your code almost exactly as it was and the calendar extender appeared.

Follow these steps exactly and it should work for you

  1. Uninstall and reinstall AJAX 1.0.
  2. From within VS 2005, create an "AJAX Enabled Website" instead of a regular website (VS 2008 automatically creates this type of website).
  3. Add a reference to AjaxControlToolkit and it should work.

If you are still having trouble
Send me your solution. I'll correct it and send it back to you.

Kant