Problem WebForm in the background to the foreground value. <input type= "hidden" value= "<%=usertype%>" id= "usertype" > to the foreground but shows <input type= "hidden" value= "" Student id= " Usertype ">. At this point JS cannot take the value of the hidden field. Later through debugging found that the value of usertype "\" Students \ "", the description value of the double quotation marks, to the page value= "" " Student" automatically put the first two "" as a value, the following quotation marks directly ignored. if value= ' usertype ' is found in single quotes, it can be displayed normally if there are double quotes in the variable. Finally, trace the cause: The address string is added double quotation marks when the page is requested:. /teacher/uploadimg.aspx?usertype=" student " because the request address itself is a string, plus double quotation marks. When the value of usertype on the server becomes the "student" and then the page is displayed, value is not normal.
Error logging: An error occurred while the value of the HTML hidden field was stored in a string