The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From: leonjhon <zhaolice...@gmail.com>
Date: Sun, 6 Apr 2008 12:07:26 -0700 (PDT)
Local: Sun, Apr 6 2008 3:07 pm
Subject: httpservice + asp 使用心得
httpservice + asp 使用心得
折腾了一晚上,终于有点结果了,现在把我的简单代码贴上来,欢迎大家拍砖! main.mxml代码如下: ?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Style> .mystyle{ font-family:宋体; font-size:14px; } </mx:Style> <mx:Script source="testAsy.as"> </mx:Script> <mx:HTTPService id="testHS" resultFormat="text" result="bb(event);"> </mx:HTTPService> <mx:Button click="sendAsy();" label="确定" x="141" y="198" styleName="mystyle"> </mx:Button> <mx:TextInput id="txt1" x="95" y="105"/> <mx:TextInput id="txt2" x="95" y="144"/> <mx:TextInput id="txtResult" text="结果显示区" x="50" y="228" styleName="mystyle"> </mx:TextInput> <mxabel x="52" y="107" text="用户名" styleName="mystyle"/> <mxabel x="52" y="146" text="密 码" styleName="mystyle"/> </mx:Application> testAsy.as 代码如下
}
internal function bb(evt:ResultEvent):void
{ txtResult.text=evt.result.toString(); }
postBack.asp 代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% response.charset="utf-8" a = "我写的测试我再试!" b=request("username") & "|" c=request("password") & "|" response.write a & b & c %> 运行说明,点击按钮即可异步获取数据,这里测试的是简单文本方式的,不过有个问题,每次修改完asp中的中文后,点击按钮,第一次显示乱码,再次点击就
我的 msn:leonjho...@hotmail.com 欢迎大家与我交流,也欢迎高手多提宝贵意见。
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||