473,320 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
3 1264
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DC Gringo | last post by:
I'm having such a problem with this DropDownList in a user control that is posting back and throwing an error: System.Web.HttpException: A DropDownList cannot have multiple items selected ...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
4
by: Moe Sizlak | last post by:
Hi There, I am trying to return the value of a listbox control that is included as a user control, I can return the name of the control but I can't access the integer value of the selected item,...
3
by: Stephen Adam | last post by:
Hi there, I'm sure i'm missing something really simple here, all i want to do is get the value of the selected item in a list box. Even after much fiddling about last night I still could not get...
2
by: John | last post by:
I have a listbox that is databound when my form loads. A user can then select and option using a drop down box. When the user selects an option the corresponding items in the listbox gets selected....
11
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
2
by: OceanBreeze | last post by:
I am using ASP.Net 2.0 and C# and new to this. I have programmatically added a zip code drop down into web form inside Page_Load method as: ZipDropDown.Items.Add("11111");...
4
by: rn5a | last post by:
I am binding a DropDownList with records existing in a database table. I want to add an extra item *SELECT COMPANY* at index 0 so that by default, it gets selected. This is how I tried it but the...
1
Eleven
by: Eleven | last post by:
Hi everybody! I've got a User Control "SelectBatchByTerminal", that has two dropdown lists, "TerminalDropDownList" and "BatchDropDownList". using System; using System.Data; using...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shćllîpôpď 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.