Hi Community
I have a working AddIn Button, that needs an extension.
Currently it’s a button of the class RibbonBarButton that works with the “Click” event, that triggers a serverside function
Code looks something like this:
RibbonBarGroup group = base.CreateDefaultContainer(); RibbonBarButton button = new RibbonBarButton(); button.Text = "Shipping Label"; button.Icon = Dynamicweb.Core.UI.Icons.KnownIcon.Label; button.Size = Icon.Size.Large; button.EnableServerClick = true; button.Click += button_Click; group.AddItem(button);
….
And button_click is a method that has this form:
void button_Click(object sender, EventArgs e)
….
The extension is to have a Frontend Dialog to pop up, to take some user inputs before running the button_Clicked method, but I can’t seem to find a good way to do that.
The RibbonBarButton comes with a OnClientClick method, and by using the info from this post ( https://doc.dynamicweb.com/forum/development/development/addins-and-custommodule-questions ) I was able to create a Dialog for the frontend, but my problem is now getting that data to the button_Click method. I can’t use the serverside Click method, that would run simultaneously with the OnClientClick method.
Is there any good way to get the data from the dialog, back to my serverside function? I can’t seem to find good examples on how to implement AddIns.