Click here to Skip to main content
15,921,660 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i am fresh in asp.net. i would like to add a calender control in my new online application. but when i am using the calender control in a table my page alignment is going wrong. kindly advice me how can i add my calender without effecting my existing form design
Posted

Can u plz put the area of code , u have written for calender , Is it a ajax calender or other one
 
Share this answer
 
Comments
Nelek 10-Nov-12 8:19am    
This is not an answer. If you have something to ask to someone in the QA section, please use the widget "have a question or comment?"
ASP.NET
<![CDATA[<%@ Page Language="VB" MasterPageFile="~/Project/FFS.master" AutoEventWireup="false" CodeFile="Form.aspx.vb" Inherits="Form" title="Reimbursement Form" %>]]>

<![CDATA[<%@ Register src="Project/DateCntrl.ascx" tagname="DateCntrl" tagprefix="uc1" %>]]>

<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server" xmlns:asp="#unknown">
    <table class="LblStyle">
        <tr>
            <td style="width: 140px" class="LblStyle">
                Transaction No:</td>
            <td style="width: 88px">
                <asp:textbox id="TxtTrx" runat="server" cssclass="TxtStyle" width="134px">
                    Enabled="False" Font-Bold="True"&gt;</asp:textbox>
            </td>
            <td style="width: 87px">
                &nbsp;</td>
            <td style="width: 115px">
                &nbsp;</td>
            <td style="width: 54px">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 140px" class="LblStyle">
                Store :<asp:requiredfieldvalidator id="RFV_trxstore" runat="server">
                    ControlToValidate="CmbStore" Display="Dynamic" ErrorMessage="*"
                    ToolTip="Please Enter Store."&gt;</asp:requiredfieldvalidator>
            </td>
            <td style="width: 88px">
                <asp:dropdownlist id="CmbStore" runat="server" cssclass="CmbStyle">
                    Height="16px" Width="169px"&gt;<asp:listitem text="----- Select -----" value=""></asp:listitem></asp:dropdownlist>
            </td>
            <td style="width: 87px" class="LblStyle">
                Reference :<asp:requiredfieldvalidator id="RFV_Txttrn" runat="server">
                    ControlToValidate="TxtRef" Display="Dynamic" ErrorMessage="*"
                    ToolTip="Please Enter Reference." ValidationGroup="smt"&gt;</asp:requiredfieldvalidator>
            </td>
            <td style="width: 115px">
                <asp:textbox id="TxtRef" runat="server" cssclass="TxtStyle" width="231px"></asp:textbox>
            </td>
           <td style="width: 54px" class="LblStyle">
                Date :<asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server">
                    ControlToValidate="TxtHdate" Display="Dynamic" ErrorMessage="*"
                    ToolTip="Please Enter Date." ValidationGroup="smt"&gt;</asp:requiredfieldvalidator>
            </td>

            <td>
                <asp:textbox id="TxtHdATE" runat="server" cssclass="TxtStyle" width="91px">
                    Height="16px"&gt;</asp:textbox>
            </td>

            <td>
                <asp:button id="Button2" runat="server" cssclass="BtnStyle" text="...">
                    Width="20px" /&gt;
            </asp:button></td>
        </tr>
        <tr>
            <td colspan="6">
                <table class="style1" style="width: 96%; margin-right: 0px; height: 24px;">
                    <tr>
                        <td style="height: 9px; width: 455px;">
                            <asp:button id="btnNewReq" runat="server" text="New" cssclass="BtnStyle">
                                Height="19px" CausesValidation="False" /&gt;
                            <asp:button id="btnSaveReq" runat="server" text="Submit">
                                ValidationGroup="smt" CssClass="BtnStyle" /&gt;
                            <asp:button id="btnSendmail" runat="server" text="Send Mail" cssclass="BtnStyle">
                                ValidationGroup="smt" Width="67px" /&gt;
                        </asp:button></asp:button></asp:button></td>
                        <td style="height: 9px; width: 414px;" class="LblStyle">
                            <asp:label id="LblError" runat="server" cssclass="LblStyle" forecolor="#FF3300"></asp:label>
                        </td>
                        <td style="width: 137px">
                            &nbsp;</td>
                    </tr>
                </table>
            </td>
            <td>
                <asp:calendar id="Calendar1" runat="server" backcolor="White">
                    BorderColor="#3366CC" BorderWidth="1px" CellPadding="1"
                    DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
                    ForeColor="#003399" Height="89px" Visible="False" Width="159px"&gt;
                    <selecteddaystyle backcolor="#009999" font-bold="True" forecolor="#CCFF99" />
                    <selectorstyle backcolor="#99CCCC" forecolor="#336666" />
                    <weekenddaystyle backcolor="#CCCCFF" />
                    <todaydaystyle backcolor="#99CCCC" forecolor="White" />
                    <othermonthdaystyle forecolor="#999999" />
                    <nextprevstyle font-size="8pt" forecolor="#CCCCFF" />
                    <dayheaderstyle backcolor="#99CCCC" forecolor="#336666" height="1px" />
                    <titlestyle backcolor="#003399" bordercolor="#3366CC" borderwidth="1px">
                        Font-Bold="True" Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" /&gt;
                </titlestyle></asp:calendar>
            </td>
        </tr>
        <tr>
            <td colspan="6">
                <table class="style1" style="width: 99%; height: 47px;">
                    <tr class="BtnStyle">
                        <td class="GridHeaderStyle" style="width: 9px; height: 13px;">
                            </td>
                       <td class="GridHeaderStyle" style="width: 30px; height: 13px;">
                            Type</td>
                       <td class="GridHeaderStyle" style="width: 7px; height: 13px;">
                            </td>
                       <td class="GridHeaderStyle" style="width: 7px; height: 13px;">
                            Account</td>
                        <td class="GridHeaderStyle" style="width: 7px; height: 13px;">
                            </td>
                        <td class="GridHeaderStyle" style="width: 7px; height: 13px;">
                            Date</td>
                        <td class="GridHeaderStyle" style="width: 4px; height: 13px;">
                            &nbsp;</td>
                        <td class="GridHeaderStyle" style="width: 4px; height: 13px;">
                            </td>
                        <td class="GridHeaderStyle" style="width: 4px; height: 13px;">
                            Amount</td>
                        <td class="GridHeaderStyle" style="width: 2px; height: 13px;">
                            &nbsp;</td>
                        <td class="GridHeaderStyle" style="width: 2px; height: 13px;">
                            </td>
                        <td class="GridHeaderStyle" style="height: 13px">
                            Remarks</td>
                        <td class="GridHeaderStyle" style="height: 13px; width: 5px;">
                            <asp:button id="BtnAdd" runat="server" text="Add" cssclass="BtnStyle">
                                Width="56px" ValidationGroup="Add"/&gt;
                             </asp:button></td>

                        </tr>
                        <td style="width: 9px">
                            <asp:requiredfieldvalidator id="RFV_trxstype" runat="server">
                    ControlToValidate="CmbType" Display="Dynamic" ErrorMessage="*"
                    ToolTip="Please Enter Type" Font-Size="Smaller" ValidationGroup="add"&gt;</asp:requiredfieldvalidator>
                        </td>
                        <td style="width: 30px">
                            <asp:dropdownlist id="CmbType" runat="server" cssclass="CmbStyle">
                                AutoPostBack="True" Height="16px" Width="247px"&gt;<asp:listitem text="----- Select -----" value=""></asp:listitem></asp:dropdownlist>
                        </td>
                        <td style="width: 7px">
                            <asp:requiredfieldvalidator id="RFV_trxaccount" runat="server">
                    ControlToValidate="Txtptyacc" Display="Dynamic" ErrorMessage="*"
                    ToolTip="Please Enter Account#" Font-Size="Smaller" ValidationGroup="add"&gt;</asp:requiredfieldvalidator>
                        </td>
                        <td style="width: 55px">
                            <asp:textbox id="Txtptyacc" runat="server" cssclass="TxtStyle" width="154px">
                                AutoCompleteType="Disabled" Enabled="False" Height="16px"&gt;</asp:textbox>
                        </td>
                        <td style="width: 7px">
                            <asp:rangevalidator id="RV_TxtDdate" runat="server">
                                ControlToValidate="TxtDdate" CssClass="LblStyle" ErrorMessage="*"
                                MaximumValue="new DateTime(2010, 01, 01).ToString(&quot;dd/MM/yyyy&quot;)"
                                MinimumValue="DateTime.Now.ToString(&quot;dd/MM/yyyy&quot;)"
                                SetFocusOnError="True" ToolTip="Please enter proper date dd/mm/yyyy"
                                ValidationGroup="add"&gt;</asp:rangevalidator>
                        </td>
                        <td style="width: 7px">
                            <asp:textbox id="TxtDdate" runat="server" cssclass="TxtStyle" width="161px">
                                Height="16px"&gt;</asp:textbox>
                        </td>
                        <td style="width: 4px">
                            <asp:button id="Button3" runat="server" cssclass="BtnStyle" text="...">
                                Width="20px" /&gt;
                        </asp:button></td>
                        <td style="width: 4px">
                            <asp:rangevalidator id="RV_TxtAmount" runat="server">
                                ControlToValidate="Txtamount" CssClass="LblStyle" ErrorMessage="*"
                                MaximumValue="-10000" MinimumValue="10000" SetFocusOnError="True"
                                ValidationGroup="add"&gt;</asp:rangevalidator>
                        </td>
                        <td style="width: 4px">
                            <asp:textbox id="Txtamount" runat="server" cssclass="TxtStyle" width="132px">
                                Height="16px"&gt;</asp:textbox>
                        </td>
                        <td style="width: 2px">
                            <asp:requiredfieldvalidator id="RFV_trxRemarks" runat="server">
                    ControlToValidate="Txtremarks" ErrorMessage="*"
                    ToolTip="Please Enter Remarks" Font-Size="Smaller" ValidationGroup="add"&gt;</asp:requiredfieldvalidator>
                            </td>
                        <td>
                            <asp:textbox id="Txtremarks" runat="server" cssclass="TxtStyle" height="17px">
                                Width="169px"&gt;</asp:textbox>
                        </td>
                        </table></td>
                    </tr>
                    <tr>
                        <td style="width: 9px">
                            &nbsp;</td>
                        <td style="width: 30px">
                            &nbsp;</td>
                        <td style="width: 7px">
                            &nbsp;</td>
                        <td style="width: 55px">
                            &nbsp;</td>
                        <td style="width: 7px">
                            &nbsp;</td>
                        <td style="width: 7px">
                            <asp:calendar id="Calendar2" runat="server" backcolor="White">
                                BorderColor="#3366CC" BorderWidth="1px" CellPadding="1"
                                DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
                                ForeColor="#003399" Height="89px" Visible="False" Width="159px"&gt;
                                <selecteddaystyle backcolor="#009999" font-bold="True" forecolor="#CCFF99" />
                                <selectorstyle backcolor="#99CCCC" forecolor="#336666" />
                                <weekenddaystyle backcolor="#CCCCFF" />
                                <todaydaystyle backcolor="#99CCCC" forecolor="White" />
                                <othermonthdaystyle forecolor="#999999" />
                                <nextprevstyle font-size="8pt" forecolor="#CCCCFF" />
                                <dayheaderstyle backcolor="#99CCCC" forecolor="#336666" height="1px" />
                                <titlestyle backcolor="#003399" bordercolor="#3366CC" borderwidth="1px">
                                    Font-Bold="True" Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" /&gt;
                            </titlestyle></asp:calendar>
                        </td>
                        <td style="width: 4px">
                            &nbsp;</td>
                        <td style="width: 4px">
                            &nbsp;</td>
                        <td style="width: 4px">
                            &nbsp;</td>
                        <td style="width: 2px">
                            &nbsp;</td>
                        <td style="width: 2px">
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>

            <td>
                &nbsp;</td>

        <tr>
            <td class="GridHeaderStyle" colspan="6">
                <asp:gridview id="GridView1" runat="server" width="99%">
                    CssClass="GridAlternatingRowStyle" Height="45px" HorizontalAlign="Left"
                    ShowFooter="True"&gt;
                    <columns>
                        <asp:boundfield headertext="Trasaction Type" datafield="ACTDESCR">
                            SortExpression="Trasaction Type"/&gt;
                        <asp:boundfield headertext="Account No" datafield="ACT_NUMST">
                            SortExpression="Account No"/&gt;
                        <asp:boundfield headertext="Inv.Date" datafield="Ddate" />
                        <asp:boundfield datafield="CRDTAMT" headertext="Amount">
                            SortExpression="Amount" /&gt;
                        <asp:boundfield headertext="Remarks" datafield="Remarks" sortexpression="Remarks" />
                        <asp:commandfield showdeletebutton="True" />
                                            </asp:boundfield></asp:boundfield></asp:boundfield></columns>
                </asp:gridview>
                 </td>
            <td class="GridHeaderStyle">
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="6">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="6">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
       <tr>
            <td colspan="6">
                <table class="style1" style="width: 96%">
                    <tr>
                        <td style="width: 1058px">
                        </td>
                        <td style="width: 2263px">
                            &nbsp;</td>
                        <td style="width: 43px">
                            <asp:button id="Button1" runat="server" cssclass="CmbStyle" forecolor="#3399FF">
                                Text="Home" Width="67px" CausesValidation="False" /&gt;
                        </asp:button></td>
                        <td>
                            <asp:button id="btnlogout" runat="server" text="Logout" cssclass="CmbStyle">
                                            ForeColor="#3399FF" CausesValidation="False" /&gt;
                                    </asp:button></td>
                    </tr>
                </table>
            </td>
            <td>
                &nbsp;</td>
        </tr>

                            <p>
                                &nbsp;</p>
                            </asp:content>
 
Share this answer
 
v2
Comments
Nelek 10-Nov-12 8:21am    
This is not an answer. If you are giving additional information (as the code you tried and give you problems), please use the widget "improve question" to edit the message adding the code. Don't post a solution that it is part of your question

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