Hello,
I created a User Control (.ascx) in my web site.
Inside this control I have a linkbutton.
I want to fire an event when this linkbutton is clicked so that I can
access that event on the page's code where my user controls is added.
How can I do this?
Thanks,
Miguel 3 1213
First you declare a public event within your control such as this example:
Public Event LinkClicked()
Then you raise the event from within your code such as in this example:
RaiseEvent LinkClicked()
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider http://SteveOrr.net
"shapper" <md*****@gmail.comwrote in message
news:11**********************@u30g2000hsc.googlegr oups.com...
Hello,
I created a User Control (.ascx) in my web site.
Inside this control I have a linkbutton.
I want to fire an event when this linkbutton is clicked so that I can
access that event on the page's code where my user controls is added.
How can I do this?
Thanks,
Miguel
On May 30, 8:42 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
<S...@Orr.netwrote:
First you declare a public event within your control such as this example:
Public Event LinkClicked()
Then you raise the event from within your code such as in this example:
RaiseEvent LinkClicked()
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsiderhttp://SteveOrr.net
"shapper" <mdmo...@gmail.comwrote in message
news:11**********************@u30g2000hsc.googlegr oups.com...
Hello,
I created a User Control (.ascx) in my web site.
Inside this control I have a linkbutton.
I want to fire an event when this linkbutton is clicked so that I can
access that event on the page's code where my user controls is added.
How can I do this?
Thanks,
Miguel
Can I raise the event and send a few parameters?
Thanks,
Miguel
Yes you can.
Public Event LinkClicked(MyParm as String, ID as Byte)
RaiseEvent LinkClicked(MyString, MyID)
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider http://SteveOrr.net
"shapper" <md*****@gmail.comwrote in message
news:11*********************@o5g2000hsb.googlegrou ps.com...
On May 30, 8:42 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
<S...@Orr.netwrote:
>First you declare a public event within your control such as this example:
Public Event LinkClicked()
Then you raise the event from within your code such as in this example: RaiseEvent LinkClicked()
-- I hope this helps, Steve C. Orr, MCSD, MVP, CSM, ASPInsiderhttp://SteveOrr.net
"shapper" <mdmo...@gmail.comwrote in message
news:11**********************@u30g2000hsc.googleg roups.com...
Hello,
I created a User Control (.ascx) in my web site.
Inside this control I have a linkbutton.
I want to fire an event when this linkbutton is clicked so that I can
access that event on the page's code where my user controls is added.
How can I do this?
Thanks,
Miguel
Can I raise the event and send a few parameters?
Thanks,
Miguel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Lance Johnson |
last post by:
I would like for when a tab page changes, that my controls on the previous
tab page would receive a visiblechanged event or some other event so they
are aware of that. We have db locks in some of...
|
by: Colin Young |
last post by:
I have a UserControl that contains a calendar control. The calendar is not
raising events (month navigation, date selections, etc.). I've checked that
the OnSelectionChanged event has a handler...
|
by: Shourie |
last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle.
1) MainPage_load
2) User control1_Load
user clicks a...
|
by: John Lau |
last post by:
Hi,
Is there documentation that talks about the page lifecycle, the lifecycle of
controls on the page, and the rendering of inline code, in a single
document?
Thanks,
John
|
by: George Durzi |
last post by:
I have a simple user control with a text box and a submit button. When the
user enters some text into the textbox and clicks the submit button, a
record is created in the database.
I'm using...
|
by: thomson |
last post by:
Hi all,
i do have a user control with 4 buttons, and all the events
are firing properly,
My problem is that i need to right an event handler in the user
control, which gets fired after a...
|
by: Mike |
last post by:
Hi,
I am strugling with a simple problem which I can't seem to resolve.
I have an asp.net page which contains a server-control (flytreeview,
which is a kind
of a tree to be exact).
The tree is...
|
by: Doug Handler |
last post by:
Hi,
I have a form (Form1) that contains a tab control which one tab has a
customer user control (UserControl1). When the user double-clicks on the
grid hosted there a new user control is...
|
by: Sylvie |
last post by:
I have
an Aspx page (Name:"PG") (Contains "UC")
and
an Ascx Usercontrol (Name:"UC") (Contains "AspxGrid1")
I wanna expose Aspxgrid1.rowchanged event to Aspx Page, when user vhanges or...
|
by: Jordan S. |
last post by:
I'm just wondering if this would work. Please note that I'm not asking *how*
to raise events. I'm clear on that. What I'm not clear on is the sequence in
which events are raised by custom controls...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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,...
| |