How to get the selected items from a user control in a web form

  • Thread starter Thread starter Celine
  • Start date Start date
C

Celine

Hi,

I am just starting developping in ASP.Net and I have some trouble
using a user control in a web form.

In my user control I have a datagrid with hyperlink and in my web page
I want to display the hyperlink that the user click in my user
control.

Does anyone know how to do this?

Thanks for your help.

Céline
 
here user control knows which link is clicked. that you can trap in user
control code behind. so you can expose link as string from your user control
and access it in your Page to display. but i would say if you have to
display the link in all pages whereever the user control is clicked, you can
very well put the link label also in your user control.

Av.
 
I would create a method (Public Function) in the control, to which I would
pass the containing page as a parameter. Instantiate the control in the
pageload event, and call the function. In the function, set an action to
navigate the main page in the hyperlink's onclick event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top