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 ");