User Profile

Collapse

Profile Sidebar

Collapse
TearX
TearX
Last Activity: Feb 11 '13, 09:41 AM
Joined: Dec 9 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • TearX
    replied to not sure why invalid cast exception
    in XML
    thank though my friend had taught me another method but your code work
    See more | Go to post

    Leave a comment:


  • TearX
    started a topic not sure why invalid cast exception
    in XML

    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
    ...
    See more | Go to post

  • TearX
    replied to Why the code is not able to detect #@<>?
    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 now
    See more | Go to post

    Leave a comment:


  • TearX
    started a topic Why the code is not able to detect #@<>?

    Why the code is not able to detect #@<>?

    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;
    }
    I have written the code...
    See more | Go to post

  • oh 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 question
    See more | Go to post

    Leave a comment:


  • About 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"];
    ...
    See more | Go to post
    Last edited by Rabbit; Dec 9 '12, 08:16 AM. Reason: Please use code tags when posting code.
No activity results to display
Show More
Working...