Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,


In my webform i have one calendar.
once i click on date one popup will open with some fields.(button)
on button click data should be added on gridview .
and also that particular date events should get display on date click.


how do i do this.


any help appreciated...


thanks in advance.:)
Posted
Updated 7-Jul-15 19:08pm
v3
Comments
Member 11686116 7-Jul-15 3:31am    
hope no one knows
Arkadeep De 7-Jul-15 8:54am    
what you have tried??
Member 11686116 8-Jul-15 0:16am    
Source Code::


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ScedulerCal.aspx.cs" Inherits="Scheduler.ScedulerCal" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%--<!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></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnableScriptGlobalization="true">

<div style="width: 100%; height: 100%" id="MainDiv">
<div style="width: 70%; float: left" id="caldiv">
<asp:Calendar ID="Calendar1" runat="server" Width="98%" Height="100%" OnSelectionChanged="Calendar1_SelectionChanged"
BackColor="White" BorderColor="Black" DayNameFormat="Shortest" Font-Names="Times New Roman"
Font-Size="10pt" ForeColor="Black" NextPrevFormat="FullMonth"
TitleFormat="Month" >
<dayheaderstyle backcolor="#CCCCCC" font-bold="True" font-size="7pt" forecolor="#333333"
="" height="10pt">
<daystyle width="14%">
<nextprevstyle font-size="8pt" forecolor="White">
<othermonthdaystyle forecolor="#999999">
<SelectedDayStyle BackColor="#CC3333" ForeColor="White" />
<SelectorStyle BackColor="#CCCCCC" Font-Bold="True" Font-Names="Verdana" Font-Size="8pt"
ForeColor="#333333" Width="1%" />
<TitleStyle BackColor="Black" Font-Bold="True" Font-Size="13pt" ForeColor="White"
Height="14pt" />
<todaydaystyle backcolor="#CCCC99">

</div>
<div style="width: 27%; float: left" id="Gvdiv">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" Width="100%"
Height="5%">
<columns>
<asp:BoundField DataField="Name" HeaderText="Name" />
<asp:BoundField DataField="Event" HeaderText="Event" />
<asp:BoundField DataField="SelectedDate" HeaderText="SelectedDate" />



</div>
</div>
<asp:Panel ID="Panel1" Style="border: Solid 1px Blue; background-color: #CCFFFF;
width: 30%" runat="server" Visible="false" BackColor="#CCCCFF">
<div style="background-color: #CCFFFF; text-align: center">
<asp:Label ID="lblE" runat="server" Text="Events On" ForeColor="Red">
<asp:TextBox ID="TextBox3" runat="server" Width="60%" Style="margin-left: 30px; background-color: Yellow">
</div>
<div id="Name">
<asp:Label ID="Label" runat="server" Text="Name" Width="5%">
<asp:TextBox ID="TextBox1" runat="server" Width="30%" Style="margin-left: 30px">
</div>
<br />
<div id="Event">
<asp:Label ID="Label2" runat="server" Text="Event" Width="5%">
<asp:TextBox ID="TextBox2" runat="server" Width="30%" Style="margin-left: 30px">
</div>
<br />
<div id="Add">
<asp:Button ID="Button1" runat="server" Text="Add" Width="20%" Style="margin-left: 50px"
OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="cancel" Width="20%" />
</div>

<asp:Button ID="Btn1" runat="server" Style="display: none" OnClick="Btn1_Click" EnableViewState="true" />
<asp:ModalPopupExtender ID="Mdl1" runat="server" TargetControlID="Btn1" PopupControlID="
Suvendu Shekhar Giri 8-Jul-15 1:32am    
So, where is the problem?
Are you getting any error?
Instead of throwing your requirement on us, it will be great if you can share the exact problem you are facing, not the complete implementation.

Please try to be more specific.
Member 11686116 8-Jul-15 1:43am    
well i have stuck in on selected date need to display events .i have no idea how to do that???

1 solution

I think this article help to you.

ViewState and Postback[^]
 
Share this answer
 

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