PC Review


Reply
Thread Tools Rate Thread

Create a UserControl.ascx File

 
 
Greg
Guest
Posts: n/a
 
      27th Oct 2009
I've been developing in C# ASP.NET for about 18 months now and am always
looking to expand my skills. Right now I'm looking into using my own User
Controls. I know how I can create one and add it a web page, but where I'm
having difficutly is Events, such as a Button_Click() event.

I've had luck with the properties and being able to set values in my the
User Controls, but from the samples I've been finding on the web I haven't
really come across one that explains how I can fire a Button Event (with my
own logic) from my Hosting Page.

Can anyone explain how I can call a btnButton_Click() event from my hosting
page?

Thanks in advance.

Greg
 
Reply With Quote
 
 
 
 
Trevor Benedict
Guest
Posts: n/a
 
      27th Oct 2009
I guess this should work
http://odetocode.com/Articles/94.aspx

Regards,

Trevor Benedict

"Greg" <(E-Mail Removed)> wrote in message
news:E5E69CA2-3F3F-4F92-A3FE-(E-Mail Removed)...
> I've been developing in C# ASP.NET for about 18 months now and am always
> looking to expand my skills. Right now I'm looking into using my own User
> Controls. I know how I can create one and add it a web page, but where I'm
> having difficutly is Events, such as a Button_Click() event.
>
> I've had luck with the properties and being able to set values in my the
> User Controls, but from the samples I've been finding on the web I haven't
> really come across one that explains how I can fire a Button Event (with
> my
> own logic) from my Hosting Page.
>
> Can anyone explain how I can call a btnButton_Click() event from my
> hosting
> page?
>
> Thanks in advance.
>
> Greg



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add javascript menu.js to usercontrol .ascx AboutJAV@gmail.com Microsoft ASP .NET 0 15th Mar 2008 06:25 PM
UserControl (ascx) - Using Javsscript =?Utf-8?B?Qw==?= Microsoft ASP .NET 1 24th Apr 2007 06:18 PM
referencing an anchor from within a usercontrol (ascx) gary Microsoft ASP .NET 3 21st Dec 2005 08:31 AM
v2 - GridView - UserControl .ascx - Problem Alexander Widera Microsoft ASP .NET 4 14th Dec 2005 10:28 AM
using .ascx file to create server control Steve Richter Microsoft ASP .NET 1 23rd Apr 2005 11:06 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:35 AM.