Solved

Geting data from an ASCX control

Posted on 2004-08-18
5
191 Views
Last Modified: 2010-04-15
Hi All,

I have an ASCX control which I have added to a ASPX page ... I now want to know two things:

1) How do i get data from the control into my parent page ....
The problem is that the control is defined in the HTML section and there is no reference to it in my codebehind so I don't know how to get to it.

2) How can I catch events from the control on my page ....

Txs
Peter
0
Comment
Question by:Pete2003
  • 3
  • 2
5 Comments
 
LVL 3

Expert Comment

by:nhewitt21
ID: 11828582
To get your control working on your page you need to put in two lines of code:

this one goes at the start of your aspx file that you want to call ya control into:
<%@ Register TagPrefix="Map" TagName="DisplayStatus" src="../Controls/Public/MapDisplayStatus.ascx"%>

and then you place the following bit of code where you want your control to display:
<Map:DisplayStatus runat="server" id="Links1"></Map:DisplayStatus>

Hope this helps.
0
 

Author Comment

by:Pete2003
ID: 11828642
Ok I got it to work but my question is how to get data from the control and how to get event info
0
 
LVL 3

Expert Comment

by:nhewitt21
ID: 11828693
0
 

Author Comment

by:Pete2003
ID: 11828849
Ok that kind of helps with the events ... but I still need to access the getters/setters of the ASCX control on my page ...
0
 
LVL 3

Accepted Solution

by:
nhewitt21 earned 400 total points
ID: 11829121
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now