call a protected sub directly?

G

Guest

I created a sub with the following definition:
Protected Sub cc_onClick(ByVal Sender As Object, ByVal e As EventArgs)
this handles some dynamicly created controls (onClick Events)
the object calling it is a link button.

On Not ispostback i want to call this sub. I know i can create a new sub to
do the same thing but it's here, why not use it?
Does someone know how?
thanks
kes
 
A

Andrea Zani

WebBuilder451 said:
I created a sub with the following definition:
Protected Sub cc_onClick(ByVal Sender As Object, ByVal e As
EventArgs) this handles some dynamicly created controls (onClick
Events)
the object calling it is a link button.

On Not ispostback i want to call this sub. I know i can create a new
sub to do the same thing but it's here, why not use it?
Does someone know how?
thanks
kes

if not Page.IsPostBack then
cc_onClick(nothing,nothing)
 
G

Guest

thanks,
i didn't know you could do that.
I do have a followup question. I need to pass an arguement in to it. Is
there a way to do that?
thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes


Andrea Zani said:
WebBuilder451 said:
I created a sub with the following definition:
Protected Sub cc_onClick(ByVal Sender As Object, ByVal e As
EventArgs) this handles some dynamicly created controls (onClick
Events)
the object calling it is a link button.

On Not ispostback i want to call this sub. I know i can create a new
sub to do the same thing but it's here, why not use it?
Does someone know how?
thanks
kes

if not Page.IsPostBack then
cc_onClick(nothing,nothing)

--
AZ [Microsoft - .NET MVP]
Mia Home page: http://ciclismo.sitiasp.it
Asp.Net community: http://www.aspitalia.com
Il mio blog: http://blogs.aspitalia.com/az
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top