Solved

Geting data from an ASCX control

Posted on 2004-08-18
5
195 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
 

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

688 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