Can any help building a valid string for
using Escape sequences. I have tried but i am getting error
this way i have tried.
DataSet
dsTool = new DataSet();string strToolTip = o.ToString();
string strCn = "Server=server;Database=pubs;User Id=uid;Password=pwd"; SqlConnection cn = new SqlConnection(strCn);cn.Open();
SqlCommand cm = new SqlCommand("select testname,testtext from testtabs where testid=" + strToolTip, cn); SqlDataAdapter dap = new SqlDataAdapter();dap.SelectCommand = cm;
dap.Fill(dsTool);
if (dsTool.Tables[0].Rows.Count > 0){
strReturn =
new StringBuilder("");strReturn =
@" # \" onmouseover=\""showToolTip(event,'" + dsTool.Tables[0].Rows[0]["testtext"].ToString() + "');return false\">"+o.ToString()+"";strReturn +=
"onmouseout=\""hideToolTip()\"">"+o.ToString()+"";}
return strReturn;
Ashley ArgilePosted Oct 7, 2008, 11:04 AM
strReturn = @"
strReturn += @"onmouseout=""hideToolTip()"">" + o.ToString() + "";
If you're using @ then you don't need \" just use "".
Regards
Ashley