﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-You and me... -文章分类-C#.NET</title><link>http://www.cnitblog.com/junhong-cai/category/7461.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 28 Sep 2011 14:46:19 GMT</lastBuildDate><pubDate>Wed, 28 Sep 2011 14:46:19 GMT</pubDate><ttl>60</ttl><item><title>C#.NET REPLACE FUNCTION </title><link>http://www.cnitblog.com/junhong-cai/articles/47135.html</link><dc:creator>疯狂水车</dc:creator><author>疯狂水车</author><pubDate>Fri, 25 Jul 2008 09:21:00 GMT</pubDate><guid>http://www.cnitblog.com/junhong-cai/articles/47135.html</guid><wfw:comment>http://www.cnitblog.com/junhong-cai/comments/47135.html</wfw:comment><comments>http://www.cnitblog.com/junhong-cai/articles/47135.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/junhong-cai/comments/commentRss/47135.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/junhong-cai/services/trackbacks/47135.html</trackback:ping><description><![CDATA[<p>e.g.<br><br>private void btnViewReport_Click(object sender, System.EventArgs e)<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;Session["Customer"] = txtCustID.Text;<br>&nbsp;&nbsp;&nbsp;<span style="COLOR: red">Session["custrefno"] = ReplaceEscapeChars(custreftxt.Text);<br></span>&nbsp;&nbsp;&nbsp;Session["partno"] = partnotxt.Text;<br>&nbsp;&nbsp;&nbsp;Session["good"] = goodtxt.Text;<br>&nbsp;&nbsp;&nbsp;Session["RFormat"] = RFormat.SelectedValue;<br>&nbsp;&nbsp;&nbsp;iFrReport.Visible = true;<br>&nbsp;&nbsp;}<br></p>
<p style="COLOR: red">&nbsp;&nbsp;public static string ReplaceEscapeChars(string str)<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;if (str == null)<br>&nbsp;&nbsp;&nbsp;&nbsp;return str;</p>
<p style="COLOR: red">&nbsp;&nbsp;&nbsp;if (str == "")<br>&nbsp;&nbsp;&nbsp;&nbsp;return str;</p>
<p style="COLOR: red">&nbsp;&nbsp;&nbsp;str = str.Replace("'", "''");<br>&nbsp;&nbsp;&nbsp;return str;<br>&nbsp;&nbsp;}</p>
<img src ="http://www.cnitblog.com/junhong-cai/aggbug/47135.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/junhong-cai/" target="_blank">疯狂水车</a> 2008-07-25 17:21 <a href="http://www.cnitblog.com/junhong-cai/articles/47135.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>