Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7824747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:42:23+00:00 2026-06-02T08:42:23+00:00

Bassicly im creating a schedule where the user can input his on time such

  • 0

Bassicly im creating a schedule where the user can input his on time such as 19/4/2012, and it gets saved into an xml file such as 19/4/2012. Im trying to perform an action that if the user enters information that has already been entered into the xml file then display a error. Im still unsure how to do such a task so any help would be appreciated thanx.

Example of xml:

<Schedule>
<Date>19/4/2012</Date>
</Schedule>

Code Example:

        private void button1_Click(object sender, EventArgs e)
      {

            XmlDocument doc = new XmlDocument();
            doc.Load("xmldoc.xml");
            XmlNode schedule = doc.CreateElement("Schedule");
            XmlNode date = doc.CreateElement("Date");
            date.InnerText = monthCalendar1.SelectionStart.ToString();
            schedule.AppendChild(date);
            doc.DocumentElement.AppendChild(schedule);
            doc.Save("xmldoc.xml");

            if(date.InnerText == monthCalander1.SelectionStart.ToString())
            {
                label6.Text = "Incorrect";

            }
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:42:24+00:00Added an answer on June 2, 2026 at 8:42 am

    Well you need to check if the date exists before you add a new schedule. You can probably do something like :

    if (doc.SelectSingleNode("/Schedule/Date[text()='" + monthCalander1.SelectionStart.ToString() + "']") != null){
       // already exists, do something here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Bassicly i want the user to input 4 and then display the next question
Bassicly im creating a program that allows the user to enter values and if
Hey I have some problems creating my query into doctrine: My sql query looks
I basicly need to load the whole XML file, add a new line with
I have a function creating a file for download like so: header(Content-type: application/octet-stream); header(Content-disposition:
Bassicly my aim is too extend a activity so when the user presses Next
i am creating rss reader application with php.it is basicly getting rss url's from
You can check page here: http://jsfiddle.net/7JhjN/ Basicly, there is a hell of duplication going
I have created a custom user control, which is basicly a ItemsControl with it's
hoping some one can shed some light on my problem. Basicly I only want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.