Botton code not running

N

Nevo

I've designed a form with a button. The button's action is "Rules and Custom
Code."

I've written code to simply display a messagebox when the button is clicked.

When I click the button, the code doesn't run. I don't understand why not.

Snippets of code:

<pre><code>
public void InternalStartup()
{

((ButtonEvent)EventManager.ControlEvents["btnSendEmail"]).Clicked += new
ClickedEventHandler(btnSendEmail_Clicked);
}

public void btnSendEmail_Clicked(object sender, ClickedEventArgs e)
{
// Write your code here.
MessageBox.Show("Sending email!");
}
</code></pre>

Why is my code not running when I fill out the form?
 
N

Nevo

It appears I have to "Publish" the form to get code to work. "Saving" the
form isn't sufficient.
 

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

Top