User Profile
Collapse
-
thank though my friend had taught me another method but your code work -
not sure why invalid cast exception
I having problem trying to read from xml file and store it in to my database
...Code:nodelist = xmlDoc.GetElementsByTagName("Item"); ArrayList inlist = new ArrayList(); foreach (XmlNode Node in nodelist) { OrderDetail od = new OrderDetail(); if (Node.Attributes.Count > 0) { textBox2.Text += "Item_ID = " + Node.Attributes[0].Value + Environment.NewLine; od.ItemId -
So what do i have to do to make fall into the fail section??
do i need to change my if statemnet?
i am very confude right nowLeave a comment:
-
Why the code is not able to detect #@<>?
I have written the code...Code:Regex regExp = new Regex("^[a-zA-Z0-9\\/(),_s]+$"); some code in between if (regExp.IsMatch(status.ToString())) { lblStatus.Text = "Comment added successfully."; lblStatus.ForeColor = System.Drawing.Color.Blue; } else { lblStatus.Text = "Comment failed to add!!!."; lblStatus.ForeColor = System.Drawing.Color.Red; } -
TearX replied to About using regex code to block word such as <b> when i press the submit and it willin C Sharpoh i see. Hence how do i write if i looking for <b> or <i>??
I still new to C# as i just started only a few months ago. I also do not understand on how a replace to remove the unwanted tags?
currently reading on the Faqs of posting a questionLeave a comment:
-
TearX started a topic About using regex code to block word such as <b> when i press the submit and it willin C SharpAbout using regex code to block word such as <b> when i press the submit and it will
I trying to block word in a comment and when they press submit it detect that it contain word such as <b> or <i>
i have written as this(below) somehow i was not able to block it
...Code:Regex regExp = new Regex("^[a-zA-Z_]*$"); string subject = tbxSubject.Text; string comment = tbxComments.Text; string username = Request.QueryString["Username"];
No activity results to display
Show More
Leave a comment: