小村上空升起袅袅炊烟,好像一个身穿白纱的少女在翩翩起舞,在夕阳的照耀下婀娜多姿。
1.在Server端添加Silverlight-enabled WCF service
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Service1
{
[OperationContract]
public void DoWork(string name,string pwd,string email,string question,string answer)
{
MembershipCreateStatus status;
Membership.CreateUser(name, pwd,email,question,answer,true,out status);
} // Add more operations here and mark them with [OperationContract]
}
2. 添加此Service 引用到Silverlight
ServiceReference2.Service1Client client = new ServiceReference2.Service1Client();
client.DoWorkAsync("xxifusi", "xxifusi345","d22@we.com","q","a");
本文asp.net 使用Silverlight操作ASPNETDB数据库到此结束。别忘了,你以往也是第一名。小编再次感谢大家对我们的支持!