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格式里的0值!
然后进行判断在转到我自己的B页! ---------------------------------------------------------------------------------------
string strXML = @"
";
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);
}