Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hye all..
Im quite confuse of what is wrong with my code.
After creating an aspx page with master page, then I add an AJAX inside (for example: CalendarExtender), its working.
However, after a while doing other coding like adding styles to other control (textbox, button, tab container), the calendar extender and modal popup didnt appear.

I have already add references (ajaxcontroltoolkit.dll) to my reference folder.
This is one of my sample code:


p/s: However my tabcontainer is WORKING.

Page with calendar extender(DIDNT WORK) and tab container (WORKING):

XML
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site1.Master" CodeBehind="WebForm1.aspx.vb" Inherits="QFMSWeb.WebForm1" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <link href="../CSS/Tab.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/calendarExt.css" rel="stylesheet" type="text/css" />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <cc1:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"
        CssClass="MyCalendar" Enabled="True" TargetControlID="TextBox1">
    </cc1:CalendarExtender>
    <br />
    <cc1:TabContainer ID="TabContainer1" runat="server" Font-Strikeout="False"
        CssClass="Tab" ActiveTabIndex="0" Width="250px" Height="94px">
    <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Customer">
    <ContentTemplate>
    <br />
    Customer Details
    </ContentTemplate>
    </cc1:TabPanel>
    </cc1:TabContainer>
</asp:Content>





Please give some suggestion what need I do to display my calendar extender. thank you all!! :)
Posted

Hello Friend,

Generally Script Manager Control will come Default With Ajax Page.
So No need to add Again ScriptManager Control.

May be this was the problem....Please Check it.
 
Share this answer
 
Comments
Sandeep Mewara 9-Jun-12 13:59pm    
No, it's not inbuilt in a page. Single instance is necessary and when present is visible. This cannot be the reason.
snamyna 10-Jun-12 9:19am    
Didnt put script manager will cause error. anyway, thanks for ur response. :)
I don't see anything wrong as such other then misplaced 'link' tags. Remove from here and place them in the head tag of master page.

Rest everything looks ok. Does page throw any error? Or just the missing extender? Do a View-Source of page after making the change I asked. See, if the extender exists or not.
 
Share this answer
 
Comments
snamyna 10-Jun-12 9:25am    
I have already placed the link into masterpage. but it didnt work. :(
page didnt show any error. the extender just didnt appear. I have checked one by one and everything that code needs is there. :(
Sandeep Mewara 10-Jun-12 11:27am    
Checked ViewSource of the page after rendering in the browser?
snamyna 10-Jun-12 20:13pm    
This is the View Source output that I get. Does it mean that Calendar Extender is not there?

<input name="ctl00$ContentPlaceHolder1$TextBox1" type="text" id="ContentPlaceHolder1_TextBox1" />

<br />
<div id="ContentPlaceHolder1_TabContainer1" class="Tab" style="text-decoration:none;width:250px;visibility:hidden;">
<div id="ContentPlaceHolder1_TabContainer1_header">
<span id="__tab_ContentPlaceHolder1_TabContainer1_TabPanel1">Customer</span>
</div><div id="ContentPlaceHolder1_TabContainer1_body" style="height:94px;">
<div id="ContentPlaceHolder1_TabContainer1_TabPanel1" style="display:none;visibility:hidden;">

<br />
Customer Details

</div>
snamyna 10-Jun-12 20:15pm    
But here it mentions that I already applied the extender into the textbox.

//<![CDATA[
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.CalendarBehavior, {"cssClass":"MyCalendar","id":"ContentPlaceHolder1_TextBox1_CalendarExtender"}, null, null, $get("ContentPlaceHolder1_TextBox1"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TabPanel, {"headerTab":$get("__tab_ContentPlaceHolder1_TabContainer1_TabPanel1")}, null, {"owner":"ContentPlaceHolder1_TabContainer1"}, $get("ContentPlaceHolder1_TabContainer1_TabPanel1"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TabContainer, {"activeTabIndex":0,"clientStateField":$get("ContentPlaceHolder1_TabContainer1_ClientState")}, null, null, $get("ContentPlaceHolder1_TabContainer1"));
});
//]]>
snamyna 11-Jun-12 1:03am    
I have googled and see some solutions involve script manager proxy where shud be placed in the aspx page and the script manager must be placed into master page. Can u explain what is actually the function of script manager proxy because i have tried that solution but seems it still didnt work. :(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900