By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,828 Members | 801 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,828 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.
"Celine" <ce***********@yahoo.fr> wrote in message
news:11**************************@posting.google.c om...
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

Nov 18 '05 #2

P: n/a
Ok but how can I trap the link clicked ?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

P: n/a
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.

"Celine" <ce***********@yahoo.fr> wrote in message
news:11**************************@posting.google.c om...
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

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.