How to force a PostBack when Ajax mode is enabled

Note that AJAX mode uses an UpdatePanel which disables controls from doing PostBacks. The solution would be to force the PostBack on specific controls by adding the below code in the Page_Load event of the page:

protected void Page_Load(object sender, EventArgs e) {
  ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
  scriptManager.RegisterPostBackControl(CONTROL_ID);
  //Further code goes here....
}

Hello everyone,

I have a WorkflowGen form with the following controls:

  • Radio buttons: abc and def

  • Dropdown: xyz

  • Attachment: File upload field

Requirement:

The attachment should be mandatory only when the dropdown value is xyz and the radio button value is either abc or def. For all other selections, the attachment should be optional.

Issue:

The attachment becomes mandatory when the condition is satisfied for the first time. However, when I change the dropdown or radio button selection, the attachment’s required status does not update. It remains mandatory even when the condition is no longer satisfied.

How can I dynamically refresh or update the attachment’s required status in WorkflowGen using C# .NET?

Is there a built-in property, event, or method to achieve this?

Any suggestions would be greatly appreciated.

Thank you!