• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

Geting data from an ASCX control

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
Pete2003
Asked:
Pete2003
  • 3
  • 2
1 Solution
 
nhewitt21Commented:
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
 
Pete2003Author Commented:
Ok I got it to work but my question is how to get data from the control and how to get event info
0
 
Pete2003Author Commented:
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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now