惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LINUX DO - 热门话题
Stack Overflow Blog
Stack Overflow Blog
B
Blog
WordPress大学
WordPress大学
Project Zero
Project Zero
P
Palo Alto Networks Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
T
Tailwind CSS Blog
Forbes - Security
Forbes - Security
F
Full Disclosure
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hacker News: Ask HN
Hacker News: Ask HN
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Fortinet All Blogs
Cisco Talos Blog
Cisco Talos Blog
G
Google Developers Blog
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
O
OpenAI News
Spread Privacy
Spread Privacy
MongoDB | Blog
MongoDB | Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Cybersecurity and Infrastructure Security Agency CISA
S
Securelist
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
IT之家
IT之家
U
Unit 42
腾讯CDC
S
Security Affairs
C
Cisco Blogs
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
B
Blog RSS Feed
宝玉的分享
宝玉的分享
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
Cyberwarzone
Cyberwarzone
T
The Blog of Author Tim Ferriss

博客园 - L.Zhang

.Net Remoting RMI框架 自己开发连接池 JDBC访问数据库 MyEclipse下开发Web Service 使用传统的XMLHttpRequest发出Ajax请求 XML CDATA XPath 数据库操作的sql脚本 直接选择排序 直接插入排序 气泡排序 Builder 生成器模式(创建型模式) Abstract Factory 抽象工厂模式(创建型模式) Factory Method 工厂方法模式(创建型模式) Singleton单件模式(创建型模式) 使用Profile Service 服务端如何使用Session 让服务端返回xml
用Get方式访问
L.Zhang · 2007-10-28 · via 博客园 - L.Zhang

//客户端代码

 <form id="form1" runat="server">
        
<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug">
            
<Services>
                
<asp:ServiceReference Path="Services/UseHttpGetService.asmx" InlineScript="true" />
            
</Services>
        
</asp:ScriptManager>
        
        
<input type="button" value="Get Random" onclick="getRandom()" />
        
<input type="button" value="Get Range Random" onclick="getRandom(50, 100)" />
        
        
<script language="javascript" type="text/javascript">
            
function getRandom(minValue, maxValue)
            {
                
if (arguments.length != 2)
                {
                    UseHttpGetService.GetRandom(onSucceeded);
                }
                
else
                {
                    UseHttpGetService.GetRangeRandom(minValue, maxValue, onSucceeded);
                }
            }
            
            
function onSucceeded(result)
            {
                alert(result);
            }
        
</script>
    
</form>

//WebService

    [WebMethod]
    
public int GetRandom()
    {
        
return new Random(DateTime.Now.Millisecond).Next();
    }

    [WebMethod]

//使用Get方式
    [ScriptMethod(UseHttpGet=true)]
    
public int GetRangeRandom(int minValue, int maxValue)
    {
        
return new Random(DateTime.Now.Millisecond).Next(minValue, maxValue);
    }