一点一滴的积累!

1-------------------------------------c#中关于二进制流的读取问题

                WebRequest wreq = WebRequest.Create("http://file.fetion.chinacache.net/www/home/v6/images/face/lianbu/lianbu.ffl");
        string s;
        using (HttpWebResponse wresp = (HttpWebResponse)wreq.GetResponse())
        {

            Stream stream = wresp.GetResponseStream();
            StreamReader sr = new StreamReader(stream);
              s = sr.ReadToEnd();
            sr.Close();
            stream.Close();
        }
        byte[] bSet = System.Text.Encoding.UTF8.GetBytes(s);
        Response.BinaryWrite(bSet);
        Response.End();

 

2------------------------------------如果想把所有的插入表操作写在一个存储过程中,通过传入参数的不同,选择相应的插入                                             操作。如何实现,能实现么?-----------------------------------------------

 

 alter proc P_book
(@name varchar(50),
@title varchar(50),
@password varchar(50)
)
as
if @password=''  insert into book(name,title) values(@name,@title)
if @password!=''  insert into Users(UserName,UserPassword) values(@name,@password)

exec P_book 'xuejibiao','1ddddddd','dd'
每个参数都要传,看你这么设条件了

 

3---------------------------------求一常见MSSQL存储过程,有关"上一篇"与"下一篇"!!!!

select top 1 articleID Title from articles where articleID>10744 and type=1002  --下一篇
select top 1 articleID Title from articles where articleID<10744 and type=1002 order by articleID desc  ---上一篇-----------------------------------------------------合为一句

 

select top 1 articleID Title from articles where articleID>10744 and type=1002  --下一篇
union
select top 1 articleID Title from articles where articleID <10744 and type=1002 order by articleID desc  ---上一篇

select top 1 * from articles a,articles b
where a.Title=b.Title and a.Title=1002 and a.articleID>10744 or b.articleID <10744
order by a.articleID desc

4---------------------------------加密/解密---封装的动态链接库[dll] 

生成,发布一下BIN文件中就能找到了dll文件了

5----------------------------------C#问题
现在有个A页面!正常A页是转到B页的!
但是现在有个短信功能需要通过url方式转到短信功能页返回一个值!但是人家是用返回的是xml格式的!

  <?xml version="1.0" encoding="UTF-8" ?>
- <response>
  <error>0 </error>
  <message>异步发送即时短信返回结果 </message>
  </response>
我如何取到xml格式里的0值!
然后进行判断在转到我自己的B页! ---------------------------------------------------------------------------------------

 string strXML = @" <?xml version=""1.0"" encoding=""UTF-8"" ?>
<response>
  <error>0 </error>
  <message>异步发送即时短信返回结果 </message>
  </response>
";
            System.Xml.XmlDocument dom = new System.Xml.XmlDocument();
            dom.LoadXml(strXML);
            System.Xml.XmlNode node = dom.SelectSingleNode("//error");
            if (node != null)
            {
                Response.Write(node.InnerText);
            }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值