473,763 Members | 2,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calendar Control in UserControl and look through usercontrol asp.n

Hi there I want to create a UserControl which simply uses a textbox and a
calendar. The calendar's visibility is set to false. If I click the
ImageButton the Calendar is visible. When you select a date, the date is
written into the textbox. But when I just want to change the Month the
calendar disappears. (When you reopen the calendar is a month further)

How can I avoid this?

public void Page_Load(objec t sender, System.EventArg s e)

{

Calendar1.Visib le = false;

}

public void ImageButton1_Cl ick(object sender,
System.Web.UI.I mageClickEventA rgs e)

{

Calendar1.Visib le = true;

}

private void DatePick(object sender, System.EventArg s e)

{

Text1.Text = Calendar1.Selec tedDate.ToShort DateString();

}


DatePick gets called in the SelectionChange d property of the Calendar.

Another issue with UserControls. When there is something behind the
userControl a textbox or button, you can see them through the usercontrol.
Can you somehow avoid this too?

Thanks a lot for your help!

Cheers

Chris
Nov 17 '05 #1
0 1196

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1012
by: Gamze | last post by:
Hi, I have a calendar control within a usercontrol. The calendar is to be used on serveral pages of a web site - hence the use of a usercontrol. I now wish to grab the value of Calendar_SelectionChanged and display in a label on the main aspx page. I thought I would be able to do this by having a Public Property within the code behind for the usercontrol as follows :
7
2691
by: Colin Young | last post by:
I have a UserControl that contains a calendar control. The calendar is not raising events (month navigation, date selections, etc.). I've checked that the OnSelectionChanged event has a handler being registered. Is there anything else obvious or otherwise that I've missed? Is there a problem using it in a UserControl? Thanks Colin
6
11300
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header" Src="WebControls/Header.ascx" %> The web user control contains the following server controls
5
4600
by: Miguel Dias Moura | last post by:
Hello, i am trying to create a .css file with several styles and apply them to the calendar control so i can change the look of: 1. Text Type and Format (Bold, Underline, etc) 2. Background Color 3. Foreground Color 4. Border Tickness 5. Border Color
0
894
by: Micke Palm | last post by:
Hi there! My problem might be a bug. I want to include a calendar controler in a regular html table. I've also included a another htmltable, but as runat=server. In the table it is two cells. When I add htmltable control to the left and the calendar to the right I cant add cells and rows to the table. No errors occured! But if I put the calendar in cell 1 and the table in the other cell (cell 2) it works fine. WHY ??? I'm going crazy on...
4
2515
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once I have exposed a public property containing the value of a textbox in a user control..how do I grab this from the calling page? I cant think of the syntax, since my page doesnt know the contents of the class (and therefore, the public...
27
2703
by: Dino M. Buljubasic | last post by:
I'd like to build a calendar displaying all days in a month in a grid so that when I click on the header of a square representing a day of month, I can add a new meeting etc. I know that .net provides a calendar control but that one is not what I want. I want my callendar to fill whole form and display only one month. I would like to build someting like this: +---------------+ | 8__________| cell header, shows day, clicking on it...
8
17004
by: Mats Lycken | last post by:
Hi, I'm working on a webproject where I have several different user controls loaded on a WebForm. A problem arises when I in one webcontrol makes a change that should be picked up by another user control. For example a webshop. I have a datagrid of products in the shopping cart in one user control. In another I have an overview of the shopping cart (lists the products and a shows an order total). When I remove a product from my datagrid...
0
1644
by: jediknight | last post by:
I have a simple project where there is a master page called MasterPage.master and some webforms which are content pages. I also have a usercontrol which is a simple calendar control popup. The folder structure is as follows: Test Folder Test.aspx (normal webform) Test2.aspx (content page) ctlCalendar.ascx
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9998
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.