Front-end:
FunctionOpen (){If($ ("# Fileupload"). Val ()! = "") {$. Get ('Veradd. aspx? Operate = open & filepath = '+ $ ("# fileupload"). Val (),Function(Info ){//Info. xxx}, 'Json');}Else{Alert ("Select a file! ");}}
Background:
Protected Void Page_load (Object Sender, eventargs e ){ If (Request. querystring [ " Operate " ]! = Null ) {Response. Clear (); response. clearcontent (); response. clearheaders (); Switch (Request. querystring [ " Operate " ]) { Case " Open " : Open (request. querystring [ " Filepath " ]); Break ;} Response. End ();}} Private Void Open ( String Filepath ){ String JSON = " {\ 'Hexle \ ': \ '0 \', \ 'binle \ ': \ '000000', \ 'firver \': \ '000000 \', \ 'harver \ ': \ '23f0 \', \ 'crc32 \ ': \ '23 F0 12 5C \', \ 'crc16 \ ': \ 'b3 fa \', \ 'filele \ ': \ '000000', \ 'blocksum \': \ '82 \'} " ; Response. Write (JSON );}
JSON cannot be single quotes. Modify \ '. Make your own notes.