To create the job application upload form, perform the following:
NOTE: Visual Studio does not provide a dialog option to directly create a user widget. You must create a file of another type and change its extension.
EXAMPLE: For more information about the contents of the file, refer to class JobApplicationUpload.ascx from the downloaded sample project.
In the markup file, you first register the necessary assemblies, so that they can be used in the template. You create a RadFormDecorator, which automatically makes the form elements look more aesthetic. Next, you create a Message control, which will display error and success messages. Then, you create labeled TextBoxes for the user input. You bind form validators, so that the user provides correct input. The labels are fetched from Resources, which are defined in JobsResources.
EXAMPLE: For more information about the contents of the file, refer to class JobApplicationUpload.cs from the downloaded sample project.
In the JobApplicationUpload.cs file, you reference the controls from the JobApplicationUploadTemplate by calling the GetControl method and returning the controls’ values. In the event handler for the form submission event, the control instantiates a JobsManager instance which works with the default provider. It creates a new JobApplication, populates it with the user input and saves it. Finally, it notifies the user for a successful submission of the application by calling Message.ShowPositiveMessage("Your application was submitted successfully");.
Back To Top