Export a web form to ASCX

Last updated Monday, May 23, 2016 in Web Forms for Marketers for Developer

Converting a web form to an .ascx file is good practice when you want to change the behavior or the appearance of a particular web form without affecting all other web forms.

Convert a web form to a .ascx file

To convert a web form to an .ascx file:

  1. Open the Form Designer and in the Select a Form dialog, select the form you would like to export. Click OK.
  2. In the Form Designer, in the Export group, click To ascx to convert a form to an .ascx file. The code is displayed in the Export to .ascx file dialog.

    Picture 1

  3. In the Export to .ascx file dialog, click Download to download the code as an .ascx file.

    Picture 3


After you have converted a web form to an .ascx file, do not delete the web form item in the Content Tree. This item is required for the analytics reports.

You can use converting a web form to an .ascx file for showing or hiding a field in a web form depending on another field value.

Send feedback about the documentation to docsite@sitecore.net.