-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: prasanth
Message 7 in Discussion

hi,
  I have created the popup calendar in ASP.NET.But the only problem is that it is not 
selecting the Todays date.i dont know what is the problem in it.
i will be sending the parent and child forms.please go through it and help me to solve 
the problem.

DatePicker.aspx



<body  ms_positioning="FlowLayout">
     
          <form id="Form1" method="post" runat="server">
               <asp:calendar id="CalVishnu" runat="server" 
OnSelectionChanged="CalVishnu_SelectionChanged" 
                         Width="120" Height="60" ForeColor="#00000" 
BorderColor="#000000" FirstDayOfWeek="Monday" BackColor="#ffffff"
                         SelectionMode="Day"  DayNameFormat="FirstTwoLetters" 
showtitle="true">
                         <TitleStyle backcolor="#000080" forecolor="#ffffff" />
                         <NextPrevStyle backcolor="#000080" forecolor="#ffffff" />
                         <OtherMonthDayStyle forecolor="#c0c0c0" />
                    </asp:calendar>
<asp:literal id="Literal1" runat="server"></asp:literal>
          </form>
     </body>
</HTML>


DatePicker.aspx.cs

private void CalVishnu_SelectionChanged(object sender, System.EventArgs e)
          {
               string strjscript = " language='java-script' runat='server'>";
               strjscript += "window.opener." + 
HttpContext.Current.Request.QueryString["formname"];
               strjscript += ".value = '" + 
CalVishnu.SelectedDate.ToString("dd/MM/yy") + "';window.close();";
               strjscript += "</script" + ">"; 
               Literal1.Text = strjscript;
          }


protected void CalVishnu_DayRender(object sender, 
System.Web.UI.WebControls.DayRenderEventArgs e)
          {
               // Clear the link from this day

               if (e.Day.Date.ToString("d") == DateTime.Now.ToString("d"))

               {
                    e.Cell.BackColor = System.Drawing.Color.Aqua ;
                    e.Cell.Enabled=true;
                   
                    
               }

          

          }

AdminChangeLog.aspx(Form where i am calling DatePicker.aspx)

<body class="diffbg" ms_positioning="gridlayout">
          
          <form id="frmAdminChangeLog" method="post" runat="server">
               
                    
                         <asp:label id="lblHeader" Runat="server">Admin Change 
Log</asp:label>
                    
               
               
               

               

               
                    
                         <asp:label id="lblFromDate" Runat="server">From 
Date</asp:label>
                         <asp:textbox id="txtStartDate" runat="server" Height="19" 
width="100%"></asp:textbox>
                         
                                    *
                         
                         
                    
                    
                         <asp:label id="Label1" Runat="server">To Date</asp:label>
                         <asp:textbox id="txtEndDate" runat="server" Height="19" 
width="100%"></asp:textbox>
                          *
                         
                    
                    
                         <asp:label id="lblTaskTemplate" Runat="server">Task 
Template</asp:label>
                          <asp:dropdownlist id="ddlTaskTemplate" Runat="server" 
AutoPostBack="True" DataTextField="" DataValueField=""
                                   CssClass="textbox" Width="98px"></asp:dropdownlist> 
*
                    
               
                                   border="0">
                    
                         <asp:placeholder id="plcSearch" 
runat="server"></asp:placeholder>
                    
               
                                   border="0">
                    
                         <asp:placeholder id="getGrid" 
Runat="server"></asp:placeholder><asp:datagrid id="DataGrid1" runat="server" 
AllowPaging="True" PagerStyle-Visible="False" PageSize="5"
                                   Width="408px" AutoGenerateColumns="False" 
Font-Size="X-Small" Font-Names="Tahoma" BorderStyle="Solid" BorderColor="Black">
                                   <Columns>
                                        <asp:BoundColumn DataField="UserID" 
HeaderText="User ID"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="TableChanged" 
HeaderText="Table Changed"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="ColumnChanged" 
HeaderText="Column Changed"></asp:BoundColumn>
                                   </Columns>
                                   <AlternatingItemStyle Font-Size="X-Small" 
Font-Names="Tahoma" ForeColor="Black" BorderStyle="Solid" BorderColor="#404040"
                                        BackColor="LightCyan"></AlternatingItemStyle>
                                   <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                   <HeaderStyle Font-Size="X-Small" 
Font-Names="Tahoma" Font-Bold="True" HorizontalAlign="Center"
                                        ForeColor="Black" BorderColor="Black" 
BackColor="AliceBlue"></HeaderStyle>
                              </asp:datagrid>
                    
               
               </TABLE></form>
     </body>
</HTML>

Please help to solve,

Thanks in advance.

Vishnu


-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to