May
27
public string RemoveBadWords(string UserComments, ArrayList BadWordsList)
{
Regex regBad = default(Regex);
IEnumerator ieBadWords = BadWordsList.GetEnumerator();
while (ieBadWords.MoveNext())
{
regBad = new Regex(”\\b” + ieBadWords.Current.ToString());
UserComments = regBad.Replace(UserComments, “yourtext”);
}
return UserComments;
}
by admin on May 27th, 2009 in ASP.Net
May
23
XmlDocument doc = new XmlDocument();
doc.LoadXml(”<sample><book id=’1′>” +
“<title>Pride And Prejudice</title>” +
“<price>19.95</price>” +
“</book><book id=’2′>” +
“<title>Hawks</title>” +
“<price>20.05</price>” +
“</book></sample>”);
XmlNode root = doc.FirstChild;
//Display the contents of the child nodes.
if (root.HasChildNodes)
{
for (int i = 0; i < root.ChildNodes.Count; i++)
{
//Response.Write(root.ChildNodes[i].InnerXml);
=2 0 Response.Write(”<br/>”);
Response.Write(root.ChildNodes[i]["title"].InnerText);
Response.Write(root.ChildNodes[i]["price"].InnerText);
}
}
by admin on May 23rd, 2009 in ASP.Net
May
10
When i was trying to use the dataview rowfilter functionality, i came across this type of issue.
I tried to find some soultions on internet but was unable to get any..
This issue comes when we try to search from the column which is numeric / decimal suing LIKE query, hence the datatype decimal doesnt matches with [...]
by admin on May 10th, 2009 in ASP.Net