我有一个webservice,它将返回一个值.我的要求是,我需要从index.html页面调用该webserive,该页面有一个html提交按钮.在该按钮上单击我正在调用javascript.从那里我想调用web方法.我怎样才能做到这一点.
我的web服务是"localhost/ws/service.asmx"; 和webmethod是HelloWorld
<input type="button" value="Submit" id="btn_submit" onclick ="return fun()">
function fun() {
// here I want to call the "helloworld" method.
return true;
}
Run Code Online (Sandbox Code Playgroud) 我有一本字典
Dictionary<string, string> rList = new Dictionary<string, string>();
rList .Add("/a/b/c", "35");
rList .Add("/a/c/f/v", "25");
rList .Add("/a/r/d/c/r/v", "29");
rList .Add("/a", "21");
rList .Add("/a/f, "84");
Run Code Online (Sandbox Code Playgroud)
我只想根据密钥中存在的"/"数来对此字典进行排序.我的预期出局是,
("/a/r/d/c/r/v", "29")
("/a/c/f/v", "25")
("/a/b/c", "35")
("/a/f, "84")
("/a", "21")
Run Code Online (Sandbox Code Playgroud)