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

Discussion in 'ASP .Net' started by Celine, May 10, 2004.

  1. Celine

    Celine Guest

    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
    Celine, May 10, 2004
    #1
    1. Advertising

  2. Celine

    avnrao Guest

    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" <> wrote in message
    news:...
    > 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
    avnrao, May 10, 2004
    #2
    1. Advertising

  3. 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!
    Celine Rimeur, May 10, 2004
    #3
  4. Celine

    Rick Spiewak Guest

    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" <> wrote in message
    news:...
    > 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
    Rick Spiewak, May 10, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stuart Dickerson
    Replies:
    0
    Views:
    2,989
    Stuart Dickerson
    Aug 29, 2003
  2. Bart Van Hemelen
    Replies:
    2
    Views:
    4,646
    Bart Van Hemelen
    Sep 4, 2006
  3. Iain
    Replies:
    3
    Views:
    911
  4. Replies:
    3
    Views:
    170
  5. Keiron Waites
    Replies:
    1
    Views:
    112
    Keiron Waites
    Oct 21, 2003
Loading...

Share This Page