Posted on 2008-07-25 17:21
疯狂水车 阅读(140)
评论(0) 编辑 收藏 引用 所属分类:
C#.NET
e.g.
private void btnViewReport_Click(object sender, System.EventArgs e)
{
Session["Customer"] = txtCustID.Text;
Session["custrefno"] = ReplaceEscapeChars(custreftxt.Text);
Session["partno"] = partnotxt.Text;
Session["good"] = goodtxt.Text;
Session["RFormat"] = RFormat.SelectedValue;
iFrReport.Visible = true;
}
public static string ReplaceEscapeChars(string str)
{
if (str == null)
return str;
if (str == "")
return str;
str = str.Replace("'", "''");
return str;
}