TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prakash Mondal
NA
288
208.5k
How to use Ajax CalendarExtender using ModalPopupExtender?
May 15 2014 3:03 AM
I want to use Ajax CalendarExtender using ModalPopupExtender, but after click TextBox the Calender is shown but did not select any date.. The Calender will be enabled with false property.
Design Part:
Default.aspx
Default.aspx (Sourcs Code):
I use Ajax DLL file that is
AjaxControlToolkit
.dll and also Registered.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="pm" %>
<!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>Untitled Page</title>
<style type="text/css">
.style1
{
width: 100%;
}
.style2
{
width: 100%;
border: 1px solid #800000;
}
.bgcolor
{
width: 400px;
height: 180px;
margin: 30px 50px;
background-color: #ffffff;
border: 1px solid black;
opacity:0.6;
filter:alpha(opacity=60); /* For IE8 and earlier */
}
.bgcolor p
{
margin: 30px 40px;
font-weight: bold;
color: #000000;
}
.style3
{
color: #FF3300;
font-weight: bold;
}
.style4
{
width: 208px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="style1">
<tr>
<td class="style4">
</td>
<td class="style3">
Use of Ajax CalenderExtender with ModalPopupExtender</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td class="style4">
</td>
<td>
<asp:Button ID="Button2" runat="server" Text="Date" />
<pm:ModalPopupExtender ID="modal123" runat="server" TargetControlID="Button2" BackgroundCssClass="bgcolor" PopupControlID="Panel1" />
<pm:CalendarExtender ID="CCC" runat="server" Enabled="True" TargetControlID="TextBox1">
</pm:CalendarExtender>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td class="style4">
</td>
<td>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td class="style4">
</td>
<td colspan="2">
<asp:Panel ID="Panel1" runat="server" Width="400px">
<table class="style2">
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
Enter Date:</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="Button1" runat="server" Text="Next>" />
</td>
<td>
</td>
</tr>
</table>
</asp:Panel>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td class="style4">
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
Output:
Here, Popup will visible, but did not select any date in Calender . That is Calender is readonly / enable = false etc.
I want to select any date in Calender which was show that TextBox.
Please Solve the Problem.
Reply
Answers (
0
)
Best approach of web application using asp.net & sqlserver
File upload control not working with update panel