Onsubmit = "unspecified errors"

Source: Internet
Author: User

In. Net CSCodeIt can be submitted in this way, but it will report: "unspecified errors". After troubleshooting, it is found that the code is no longer in the body content when it is output on the front-end page.

 1 Response. Write ( "  <Form method = \ "Post \" Accept-charset = \ "GBK \" Action = \ "http://baidu.com \" onsubmit =  " Export net. charset = '  GBK  ' ; "  >  "  );  2 Response. Write ("  <Textarea id = \ "submitvalue \" name = \ "submitvalue \"> A =  " + 123 + "  <Textarea>  "  );  3 Response. Write ( "  <Input name = \ "btnsubmit \" id = \ "btnsave \" type = \ "Submit \" value = \ "Submit \">  "  );  4 Response. Write ( "  </Form>  "  );  5 Response. Write ( "  <SCRIPT>  "  );  6 Response. Write ( "  Document. getelementbyid ('btnsave'). Click ();  "  );  7 Response. Write ( "  </SCRIPT>  " );

 

Therefore, you can add an encoding during loading to solve the encoding problem.

Make a note!

 
Response. contentencoding = system. Text. encoding. getencoding ("GBK ");

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.