473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Cannot access server page custom controls in website page

I m making calendar in server control page by taking composite control.I am also adding textbox in each cell of calendar. Now i want to access the value of each textbox of selected month and respected date in default.aspx page on button click event. Here the button is not a custom control but defined in default.aspx page..
Can't access textbox text and date or controls of server page in website(default.aspx) page.
Jan 24 '15 #1
2 1316
Hi,In c# I have successfully generate a calendar with a text box in each cell of the calendar. These text boxes which belong to each date in the calendar are used for user to enter an event for that day. My problem is I can't find a way to capture the value in these text boxes. What I need is how do I capture the user input in these text boxes? Is there a function beside DayRender control that allow me to go from the first day of the month to the end of the month while capturing the text box value in each day? Thanks you very much.
Jan 24 '15 #2
Frinavale
9,735 Expert Mod 8TB
In your custom control add a Public Property that exposes the text of the TextBox for the event details to the calling code so that you can access it where you need it.

For example, add this property to your customized calendar control:
Expand|Select|Wrap|Line Numbers
  1. public string EventDetails{
  2. get{ return txt_EventDetails.Text;}
  3. set{ txt_EventDetails.Text = value;}
  4. }
Then in your page you can use this property.
-Frinny
Jan 27 '15 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Tim Regan | last post by:
Hi Folks, This page of asp should (I think) generate a page that reads: Firstly Secondly Thirdly Fourthly Fifthly
3
by: Lloyd Sheen | last post by:
I have a piece of functionallity that is replicated on several pages. This would be a good candidate for a custom control right? Well I found a couple of tutorials (none really helpful) so I...
2
by: Chris Fink | last post by:
I encountered a very odd error this afternoon. A website that has been in production for quite some time suddenly came up with a page cannot be found on the main index.aspx page for the site. 5...
12
by: Logan | last post by:
Hi, I am not a very experienced asp.net developer, but have a fair idea on how it works & better idea on vb.net. My requirement is to place an asp.net page on a website - which currently has...
2
by: Steve Franks | last post by:
I am trying to access strongly typed properties in a page's master page from the content page. I followed an article that describes how to do this, and it seems quite straight forward. However...
0
by: Brian Young | last post by:
My department is responsible for creating custom internal applications for many of our departments. Our strategy has always been to develop our applications as ActiveX controls (VB6) that get...
2
by: Kees de Winter | last post by:
Hi, I dynamically create several user controls of the same type but then on postback I can not access the properties of the user controls. Why is that?? I get the "Object reference not set to an...
11
by: prp | last post by:
Hi all There is a webpage name webform1.aspx and i want to redirect this page to the www.gmail.com . How can i do it. I have use hyperlinkbutton and Response.Redirect("www.gmail.com") but i...
4
by: TS | last post by:
Steven, i lost this message conversation from outlook express and made a post online (see last one on this page). Please answer it as it hasn't been yet. thanks The clientID of our controls...
5
by: Dipti Dhiman | last post by:
I cannot access attributes control of server control page calendar in default.aspx Dipti_Calendar.cs using System; using System.Collections.Generic; using System.ComponentModel; using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...

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.