Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET Ajax
Hi,
 
i have a problem when i add second ajax control in a page which is already have one. i already embed toolkit script manager for creating a tab container.then in that tab panel i want to add one more control which is calender extender.
 
when i run the application the date is not insert into database.the textbox which is the target doesnt have the value.it is empty.so how can i do this?
 

 
thanks.
Posted 22-Nov-11 20:32pm
musiw639
Comments
Uma Shankar Patel at 23-Nov-11 2:56am
   
Share code.
Eduard Lu at 23-Nov-11 3:20am
   
Can you share us your script?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
I give you simple example working calender extender controls a single page.
 
Add AjaxControlToolkit control on web.config file.
<pages>
			<controls>
				<add tagprefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
				<add tagprefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
				<add tagprefix="ajax" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" />
				
			</controls>
		</pages>
Add Default.aspx
 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Multiple Controls Ajax
    </title>
</head>
<body>
   <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        
        <table>
            <tr>
                <td>
                    Date1
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txtDate1" runat="server">
                    <ajax:CalendarExtender ID="CalendarExtender1"  runat="server" TargetControlID="txtDate1"
                       CssClass="cal_Theme1" Format="dd-MMM-yyyy">
                    
                </td>
            </tr>
            <tr>
                <td>
                    Date2
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txtDate2" runat="server">
                    <ajax:CalendarExtender ID="CalendarExtender2" TargetControlID="txtDate2" CssClass="cal_Theme1"
                         runat="server" Format="dd-MMM-yyyy">
                    
                </td>
            </tr>
            <tr>
                <td>
                    Date3
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txtDate3" runat="server">
                    <ajax:CalendarExtender ID="CalendarExtender3"  runat="server" TargetControlID="txtDate3"
                        CssClass="cal_Theme1" Format="dd-MMM-yyyy">
                    
                </td>
            </tr>
            <tr>
                <td>
                    Date4
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txtDate4" runat="server">
                </td>
                <ajax:CalendarExtender ID="CalendarExtender4"  runat="server" TargetControlID="txtDate4"
                    CssClass="cal_Theme1" Format="dd-MMM-yyyy">
                
            </tr>
        </table>
    </div>
 </form>
</body>
</html>
 

  Permalink  
v2
Comments
musiw at 24-Nov-11 21:01pm
   
TQ Jeetu :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You just gave an example of how to add additional extenders to DIFFERENT controls. The questioner is asking about how to add multiple extenders to the SAME control.
  Permalink  
Comments
André Kraak at 30-Nov-12 9:52am
   
If you have a question about or comment on a given solution use the "Have a Question or Comment?" option beneath the solution. When using this option the person who gave the solution gets an e-mail message and knows you placed a comment and can respond if he/she wants.
 
Please move the content of this solution to the solution you are commenting on and remove the solution.
Thank you.

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 359
1 Richard MacCutchan 320
2 OriginalGriff 280
3 Jared Sanow 145
4 Snehasish_Nandy 115
0 Sergey Alexandrovich Kryukov 5,939
1 OriginalGriff 4,885
2 CPallini 2,473
3 Abhinav S 1,507
4 Richard MacCutchan 1,437


Advertise | Privacy | Mobile
Web01 | 2.8.140814.1 | Last Updated 30 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100