当前位置:编程学习 > C#/ASP.NET >>

求助!哪位哥哥能把以下php转成asp.net

<?php
$uid = "12880";
$uname = "zhangsan";
$email = "zhangsan@uyan.cc";
$uface = "http://www.zhangsang.com/images/1.jpg";
$ulink = "http://www.zhangsang.com";
$expire = "3600";
$key = "上面设置的‘认证密匙’";

$encode_data = array( 
   'uid'=>$uid, 
   'uname'=>$uname, 
   'email'=>$email, 
   'uface'=>$uface, 
   'ulink'=>$ulink,
   'expire'=>$expire
);
setcookie('syncuyan', des_encrypt(json_encode($encode_data), $key), time() + 3600, '/', '');
?>


<?php
setcookie('syncuyan', 'logout', time() + 3600, '/', 'blog.jiathis.com');
?> --------------------编程问答--------------------
引用 楼主 qb926 的回复:
<?php
$uid = "12880";
$uname = "zhangsan";
$email = "zhangsan@uyan.cc";
$uface = "http://www.zhangsang.com/images/1.jpg";
$ulink = "http://www.zhangsang.com";
$expire = "3600";
$key = "上面设置的‘认证密匙’";

$encode_data = array( 
   'uid'=>$uid, 
   'uname'=>$uname, 
   'email'=>$email, 
   'uface'=>$uface, 
   'ulink'=>$ulink,
   'expire'=>$expire
);
setcookie('syncuyan', des_encrypt(json_encode($encode_data), $key), time() + 3600, '/', '');
?>


<?php
setcookie('syncuyan', 'logout', time() + 3600, '/', 'blog.jiathis.com');
?>


这不就是定义参数,放入数组,进行JSON转换,加密,存入cookie么?
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,