Solved

Geting data from an ASCX control

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

696 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