This example shows how to integrate a form component.
public IActionResult Action()
{
	try
	{
		var data = JObject.Parse(this.HttpContext.Request.Form["data"]);
		var action = data["action"].ToString();
		switch (action)
		{
			case "Initialize":
				var initData = StiWebForm.Initialize(data, null);
				return Json(initData.Content);               

			default:
				var result = StiWebForm.ProcessRequest(data);
				return result.ContentType switch
				{
					"application/pdf" => new FileContentResult(result.Content as byte[], result.ContentType),
					_ => Json(result.Content),
				};
		}
	}
	catch (Exception e)
	{
		return new ContentResult()
		{
			Content = e.Message,
			ContentType = "text/plain"
		};    
	}
}

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.