asp.net 使用Silverlight操作ASPNETDB数据库
天地龙魂漫画,拳击小将一步,日月水火ppt
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");
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!!
点击进行留言回复
网友评论