小编ocp*_*ocp的帖子

如何从html页面[javascript]调用webservice方法而不刷新页面

我有一个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)

html javascript jquery web-services

11
推荐指数
2
解决办法
9万
查看次数

在字典C#中排序

我有一本字典

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)

.net c# vb.net asp.net

3
推荐指数
1
解决办法
186
查看次数

标签 统计

.net ×1

asp.net ×1

c# ×1

html ×1

javascript ×1

jquery ×1

vb.net ×1

web-services ×1