Solved

Geting data from an ASCX control

Posted on 2004-08-18
5
190 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

14 Experts available now in Live!

Get 1:1 Help Now