Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 12th, 2009, 09:43 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Question Need help understanding why user control shows

I have an application where user selects from drop down list and text boxes and click the "GO' button (button1). I have defined button1 as default button as well. I also have a calendar that pop up when user clicks a link button.

Now, if user presses the enter key, the calendar pops up (no click on the link button have taken place). In my code behind, I have set the calendar not to be visible. Can someone explain to me why this happens?

Here is code snippet:

Code:
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    &nbsp; &nbsp;
    <div>
        <asp:Panel ID="Panel1" runat="server" Height="510px" Style="left: 1px; position: relative;
            top: -48px">
            &nbsp;&nbsp;
            <div>
 
 
                <asp:Panel ID="Panel2" DefaultButton="button1" runat="server" Height="33px" Style="border-right: gray thin solid;
                    border-top: gray thin solid; left: 0px; border-left: gray thin solid; border-bottom: gray thin solid;
                    position: relative; top: 57px; background-color: #ffffcc; z-index: 100;" Width="948px">
                    <asp:Label ID="Label1" runat="server" Style="font-size: 25px; left: 333px; color: blue;
                        position: absolute; top: -37px; z-index: 100;" Text="J O B"></asp:Label>
                    <asp:Label ID="Label2" runat="server" Style="font-size: 25px; left: 401px; color: blue;
                        position: absolute; top: -37px; z-index: 101;" Text="R E P O R T I N G " Width="194px"></asp:Label>
 
......................
........................
...........................
 
<asp:Calendar ID="Calendar1" runat="server" Height="32px" Style="z-index: 104; border-right: blue thin solid;
                    border-top: blue thin solid; font-size: 10px; left: 661px; border-left: blue thin solid;
                    border-bottom: blue thin solid; position: absolute; top: 111px" Width="180px"
                    BackColor="White" BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest"
                    Font-Names="Verdana" Font-Size="8pt" ForeColor="Black">
                    <SelectedDayStyle ForeColor="White" BackColor="#666666" Font-Bold="True" />
                    <TodayDayStyle ForeColor="Blue" BackColor="#CCCCCC" />
                    <WeekendDayStyle ForeColor="Red" BackColor="#FFFFCC" />
                    <SelectorStyle BackColor="#CCCCCC" />
                    <OtherMonthDayStyle ForeColor="Gray" />
                    <NextPrevStyle VerticalAlign="Bottom" />
                    <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
                    <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
                </asp:Calendar





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 8: User Controls - Shows all banners VeganMan BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 April 9th, 2008 03:45 PM
listbox control items count shows 0. vikram_bendre ASP.NET 2.0 Basics 5 August 24th, 2006 08:37 AM
repeater control only shows last Item info trancehead ASP.NET 2.0 Basics 0 July 3rd, 2006 09:06 AM
submit button shows the user input in another page debjanib ASP.NET 1.0 and 1.1 Professional 3 June 30th, 2006 09:40 AM
Add Windows User control in Web User Control agarwalvidhu C# 0 March 30th, 2006 01:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.