473,480 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

WebUser Control Usage!

Hi All, I have a scenario in which I have created a web user control with 3
linkbuttons on it. Now I am using that control in a webform. The thing is I
want to display certain regions in my webpage depending upon the linkbutton
which was clicked.
Q. How do I identify which linkbutton from the web user control was clicked
on my webform?
TIA
Nov 19 '05 #1
2 1021

The easiest and recommended way is to handle the events that will get fired
to the linkbutton.

If you need to find out which control was the event target you can use
Request.Form["__eventTarget"] to retrieve that information.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog
"Vai2000" <no****@microsoft.com> wrote in message
news:ew**************@tk2msftngp13.phx.gbl...
Hi All, I have a scenario in which I have created a web user control with 3 linkbuttons on it. Now I am using that control in a webform. The thing is I want to display certain regions in my webpage depending upon the linkbutton which was clicked.
Q. How do I identify which linkbutton from the web user control was clicked on my webform?
TIA

Nov 19 '05 #2
Define correspondent events for your control. Fire them when your buttons
are clicked. You page subscribes (listens) to those events and do whatever
it is when it gets event notification. You can also create a class based on
EventArgs class, define any kind of properties your main page might need
from you control and pass an instance of that class as a parameter to the
event. Easy.

Hope it helps.
Kikoz

"Vai2000" <no****@microsoft.com> wrote in message
news:ew**************@tk2msftngp13.phx.gbl...
Hi All, I have a scenario in which I have created a web user control with
3
linkbuttons on it. Now I am using that control in a webform. The thing is
I
want to display certain regions in my webpage depending upon the
linkbutton
which was clicked.
Q. How do I identify which linkbutton from the web user control was
clicked
on my webform?
TIA

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5393
by: Metior | last post by:
Hi, The error i get is as follows: Microsoft OLE DB Provider for ODBC Drivers error '80040e4d' Login failed for user 'webuser'.
3
673
by: Robert | last post by:
Hi all, I am writing programs of algorithms using C++ and C. When I run the programs, I found the programs take 100 percent of the CPU usage and I cannot run any other program. How to control...
2
2211
by: Tomaz Koritnik | last post by:
I require a very simple control for C# that will be able to display HTML page stored in a file. I will never need to download page from internet. It'll be for offline usage only. I only need to...
1
991
by: New User | last post by:
I have following structure for my project myproj Controls/control1 morepages/special.aspx specialpages/webpage1.aspx scripts/filename.js default.aspx
7
12276
by: ApexData | last post by:
I am using the following code in my TabControl to manage subform loads. The code assigns the subForms SourceObject. - Do I also need code to DeAssign the SourceObject when leaving the Tab, I'm...
2
1660
by: =?Utf-8?B?UGFkYW0=?= | last post by:
i have created couple of dynamic controls (dropdownlist and imagebutton) in webuser controls and assigned selected index change event and image button clicked. I am giving names to control...
0
949
by: =?Utf-8?B?UGFkYW0=?= | last post by:
I created a web user controls. it generates a html table. i want to use this generated html table into code behind file (inside cell of another html table) of another web user control file.
1
4079
by: Adam Clauss | last post by:
We have created an ActiveX control (a series of them actually) which can be loaded into Internet Explorer and accessed via Javascript using the techniques described here:...
17
7928
by: Cesar | last post by:
Hello people. I'm having a Winform app that contains a webbrowser control that keeps navigating from one page to another permanentrly to make some tests. The problem I'm having is that after a...
0
7037
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7076
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6886
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4768
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
2990
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.