Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET VB.NET
i used calender control that is in cal.aspx and when i select date it should display fromDate in between ToDate in colors. i.e.fromDate and ToDate are used in date.aspx this values has to shown in cal.aspx
 
please help me
cal.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="search.aspx.vb" Inherits="search" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 
<!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%;
        }
    </style>
    <script type="text/javascript">
       function color()
       {
 
       }
           </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
 
        <table class="style1">
            <tr>
                <td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="Label1" runat="server" Font-Bold="True" Text="Travel"></asp:Label>
&nbsp;&nbsp;&nbsp;
                    <asp:TextBox ID="txtdt" runat="server"></asp:TextBox>
                     <asp:Calendar ID="Calendar1" runat="server"  OnDayRender="DayRender">
                    </asp:Calendar>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
               </tr>
        </table>
 
    </div>
    </form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="mypage.aspx.vb" Inherits="_mypage" %>
 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 
<!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>Tracker</title>
       <link href="style.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript">
 
function fn_getdays()
{
 
    var txtfrom = document.getElementById('txtfmdt').value;
    var txtodt = document.getElementById('txttodt').value;
    var sName1=_mypage.GetCheckdt(txtfrom,txtodt);
 
    document.getElementById('txtnodt').value = sName1.value;
}
    </script>
 
    <style type="text/css">
        .style1
        {
 
            width: 100%;
            background-color:Gray
        }
        .style2
        {
            width: 286px;
            background-color:Gray
        }
        .style3
        {
            width: 429px;
            background-color:Gray
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"/>
             <img src="pic_11.jpg" />
             <img src="logo.gif" style="margin-left: 123px; margin-top: 0px" />
 

 
          <style="width: 876px; height: 66px; margin-left: 114px; margin-top: 0px" /><table class="style1">
            <tr>
 
                <td class="style3">
                    <asp:Label ID="Label1" runat="server" Text="FromDate"></asp:Label>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="txtfmdt" runat="server"></asp:TextBox>
                    <img alt="imgbtncalc1" src="Calendar.png" style="width: 16px; height: 16px" /><br />
                    <cc1:CalendarExtender Format="dd/MM/yyyy"  ID="cle1" runat="server" TargetControlID="txtfmdt"
                        PopupButtonID="imgbtncalc1">
                    </cc1:CalendarExtender>
                </td>
                <td class="style2">
                    <asp:Label ID="Label2" runat="server" Text="ToDate"></asp:Label>
                    &nbsp;
                    <asp:TextBox ID="txttodt" runat="server" onchange="fn_getdays()" AutoPostBack="true"></asp:TextBox>
                    <img alt="imgbtncalc2" src="Calendar.png" style="width: 16px; height: 16px" />
                    &nbsp;<cc1:CalendarExtender Format="dd/MM/yyyy" ID="cle2" runat="server"
                        TargetControlID="txttodt" PopupButtonID="imgbtncalc2">
                    </cc1:CalendarExtender>
                 <br />
                </td>
                <td>
                    <asp:Label ID="Label9" runat="server" Text="NoofDays"></asp:Label>
                    &nbsp;<asp:TextBox ID="txtnodt" runat="server" Style="margin-right: 0px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    <asp:Label ID0="Label3" runat="server" Text="FromPlace"></asp:Label>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="txtplace" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtplace"
                        runat="server" ErrorMessage="FromPlace should be  their"
                        ForeColor="#FF9900"></asp:RequiredFieldValidator>
                </td>
                <td class="style2">
                    <asp:Label ID="Label4" runat="server" Text="ToPlace"></asp:Label>
                    &nbsp;<asp:TextBox ID="txttoplc" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txttoplc"
                        ErrorMessage="ToPlace should be Their" ForeColor="#FF9900"></asp:RequiredFieldValidator>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style3">
                    <asp:Label ID="Label5" runat="server" Text="Client"></asp:Label>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="Txtclient" runat="server"></asp:TextBox>
                &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                        ControlToValidate="Txtclient" ErrorMessage="Only Characters allowed "
                        ForeColor="#FF9900"></asp:RequiredFieldValidator>
                </td>
                <td class="style2">
                    &nbsp;<asp:CompareValidator ID="CompareValidator1" runat="server"
                        ControlToCompare="txtfmdt" ControlToValidate="txttodt" EnableViewState="False"
                        ErrorMessage="ToDate should be greater than from FromDate"
                        Operator="GreaterThan" Type="Date" ForeColor="#FF9933"></asp:CompareValidator>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style3">
                    <asp:Label ID="Label6" runat="server" Text="Contact Number"></asp:Label>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="Txtcntno" runat="server"></asp:TextBox>
                &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
                        ControlToValidate="Txtcntno" ErrorMessage="Only Numbers Allowed"
                        ForeColor="#FF9900"></asp:RequiredFieldValidator>
                </td>
                <td class="style2">
                    &nbsp;
                    </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style3">
                    <asp:Label ID="Label7" runat="server" Text="Person Met"></asp:Label>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="Txtprsmt" runat="server"></asp:TextBox>
                &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
                        ControlToValidate="Txtprsmt" ErrorMessage="Only Charactes allowed"
                        ForeColor="#FF9900"></asp:RequiredFieldValidator>
                </td>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style3">
                    <asp:Label ID="Label8" runat="server" Text="Meeting Information"></asp:Label>
                    &nbsp;&nbsp; &nbsp;<asp:TextBox
                        ID="Txtinfo" runat="server" TextMode="MultiLine"></asp:TextBox>
                </td>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style3">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;
                    <asp:Button ID="Button1" runat="server" Font-Bold="True" Text="Submit" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="Button2" runat="server" Font-Bold="True"
                        PostBackUrl="~/search.aspx" Text="Search" />
                </td>
                <td class="style2">
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style3">
                    &nbsp;
                </td>
                <td class="style2">
                    &nbsp;
                    <img src="alert.gif" style="width: 293px; height: 91px; margin-top: 0px;" /></td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style3">
                    &nbsp;
                </td>
                <td class="style2">
                    &nbsp;&nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html
>
Posted 10-Jul-12 22:23pm
Edited 11-Jul-12 3:01am
v2
Comments
pradiprenushe at 11-Jul-12 5:46am
   
Cant understand what you are saying. Hard to read your question....
Sergey Alexandrovich Kryukov at 11-Jul-12 11:06am
   
And..? Where is your question?
--SA

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

  Print Answers RSS
0 OriginalGriff 510
1 Prakriti Goyal 255
2 Yogesh Kumar Tyagi 224
3 Maciej Los 195
4 CPallini 180
0 OriginalGriff 6,632
1 Sergey Alexandrovich Kryukov 5,429
2 Maciej Los 3,474
3 Peter Leow 3,309
4 DamithSL 2,495


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 11 Jul 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