The frontend and backend are separated during system modeling. When the integration interface is later added, the following ASP. NET error is prompted: the current context does not contain the name "fileupload1 ":
Cause of error: add the aspx file of another website directly from the current website, and there is aspx under the aspx file of the original website. CS and designer. CS. After being added, only aspx is available under Aspx. CS:
Delete the page file, manually create a file with the same name in Vs, and then separate the code in aspx and Aspx. copy the code in CS back, (designer. the Code vs in CS will be generated by itself ).
Open the designer. CS file and register the control. For example, the ID of the Textbox Control to add HTML is txtadminname, as shown below:
/// <Summary> /// txtadminname control. /// </Summary> /// <remarks> /// automatically generated field. /// To modify the field declaration, move the field declaration from the designer file to the code hidden file. /// </Remarks> protected global: system. Web. UI. htmlcontrols. htmlinputtext txtadminname;
- Vs smart prompt disappears: you can press Ctrl + J to call up the smart prompt or restart.
Convert web forms to Web Applications