难题求助,大神们,谢谢了 副站要获取主站中用户123123123的头像,应该写一句byte[] data = new WebClient().DownloadData("http://主站/get_photo?userid=123123123");输出的就是头像图片的字节。然后主站,可以检查对方的IP,确定只有客户端是副站时才响应。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 想了一下,用户上传头像时,同时提交到两个表里就行了,麻烦帮我看看,这里怎么写,可以让user_icon,同时提交到另一个数据库AAA,BBB表的usericon值,,它们是同步注册的。拜托了这是前台: <input name="user_icon" id="user_icon" value="<%=user_icon %>" size="60" maxlength="200" onblur="getImg();" type="text"/><a href="javascript:void(0);" onclick="updisp();"> 上传</a> <br />这是后台: private void get_uinfo() { DataView defaultView = Conn.GetDataSet("select * from ov_user where userid=" + asoon.BLL.page.usercp.usercp.u.id).Tables[0].DefaultView; this.uid = asoon.BLL.page.usercp.usercp.u.id.ToString(); this.uname = asoon.BLL.page.usercp.usercp.u.name.ToString(); if (defaultView.Count > 0) { this.user_icon = defaultView[0]["user_icon"].ToString(); this.truename = defaultView[0]["truename"].ToString(); this.sex = defaultView[0]["sex"].ToString(); if (!string.IsNullOrEmpty(defaultView[0]["birthday"].ToString())) { this.birthday = TypeParse.ToDateTime<object>(defaultView[0]["birthday"]); } this.homepage = defaultView[0]["homepage"].ToString(); this.email = defaultView[0]["email"].ToString(); this.qq = defaultView[0]["qq"].ToString(); this.msn = defaultView[0]["msn"].ToString(); this.tel = defaultView[0]["tel"].ToString(); this.address = defaultView[0]["address"].ToString(); this.province = defaultView[0]["province"].ToString(); this.area = defaultView[0]["area"].ToString(); this.city = defaultView[0]["city"].ToString(); this.job = defaultView[0]["job"].ToString(); if (this.sex == "0") { this.sexchk[0] = "checked=\"checked\""; } else { this.sexchk[1] = "checked=\"checked\""; } } } 可能你又会问:“哎呀,我不知道Conn.GetDataSet(....)这行代码如何调用两次、每一次都只是数据库连接字符串稍微变化。请直接给我写代码吧。”我想这个问题,你还是要找到你们自己的封装这个 Conn 类的人去让他给你解决。如果同事写的 Conn 类代码你看不懂,你又不想不耻下问地问她,干脆自己写一个 Conn 类并且完成这个功能就行了。 救命!如何在Datagridview中显示这样的内容? 多线程问题. const访问修饰符 怎么用Server.Transfer传值和怎么实例其他网面的类? 关于datatime类型数据的问题 为什么不能赋值,有关enum 启动vs.net打开项目的时候 提示crystal report “密钥错误” 是什么原因?急,,, 请问在WIN 98 richTextBox1.Select(1,5)问题 XML中多个表怎么合并到一个表中!!! 弹出新窗体后界面卡死 C# 新建窗口 数据同步问题 Unload与析构函数
这是前台: <input name="user_icon" id="user_icon" value="<%=user_icon %>" size="60" maxlength="200" onblur="getImg();" type="text"/><a href="javascript:void(0);" onclick="updisp();"> 上传</a> <br />这是后台: private void get_uinfo()
{
DataView defaultView = Conn.GetDataSet("select * from ov_user where userid=" + asoon.BLL.page.usercp.usercp.u.id).Tables[0].DefaultView; this.uid = asoon.BLL.page.usercp.usercp.u.id.ToString();
this.uname = asoon.BLL.page.usercp.usercp.u.name.ToString();
if (defaultView.Count > 0)
{
this.user_icon = defaultView[0]["user_icon"].ToString();
this.truename = defaultView[0]["truename"].ToString();
this.sex = defaultView[0]["sex"].ToString();
if (!string.IsNullOrEmpty(defaultView[0]["birthday"].ToString()))
{
this.birthday = TypeParse.ToDateTime<object>(defaultView[0]["birthday"]);
}
this.homepage = defaultView[0]["homepage"].ToString();
this.email = defaultView[0]["email"].ToString();
this.qq = defaultView[0]["qq"].ToString();
this.msn = defaultView[0]["msn"].ToString();
this.tel = defaultView[0]["tel"].ToString();
this.address = defaultView[0]["address"].ToString();
this.province = defaultView[0]["province"].ToString();
this.area = defaultView[0]["area"].ToString();
this.city = defaultView[0]["city"].ToString();
this.job = defaultView[0]["job"].ToString();
if (this.sex == "0")
{
this.sexchk[0] = "checked=\"checked\"";
}
else
{
this.sexchk[1] = "checked=\"checked\"";
}
}
}