locked
Calling a procedure from within a procedure RRS feed

  • Question

  • User380413204 posted

    Hi,

    This is very basic VB.Net stuff .

    (Still looking for a good book that really starts with the basics. In the process I have purchased a numer of books, but they all somehow seem to expect some basis knowledge from the start.)

     

    Protected Sub RefreshReport_Click( blahdiblahdiblah

    Protected Sub DeleteIC_Click( blahdiblahdiblah

     

    I want to call RefreshReport_Click  from within DeleteIC_Click

    Thanks in advance,

    Lex

    Sunday, June 18, 2006 7:13 AM

All replies

  • User541108374 posted

    Hi,

    you can call another eventhandler like this:

    RefreshReport_Click(Nothing, EventArgs.Empty)

    In C# it would be RefreshReport_Click(null, EventArgs.Empty);

    Another thing you could do is to create a private method in your code that can be called from the different eventhandlers. This has another nice benefit because the called eventhandler could have some other stuff in it that you don't want to get executed when calling it from another eventhandler.

    Grz, Kris.

    Sunday, June 18, 2006 8:13 AM
  • User380413204 posted

    Thanks Kris,

    Lex

     

    Monday, June 19, 2006 3:21 AM