TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
JOHN JOHNNNY
NA
190
140.1k
An exception of type 'System.Reflection.TargetInvocationExce
Feb 4 2015 9:42 AM
Hi
I am trying to use date picker in my app but when i run the code in the emulator it shows the following error
"An exception of type 'System.Reflection.TargetInvocationException' occurred in Microsoft.Phone.ni.dll and wasn't handled before a managed/native boundary
The program '[2184] TaskHost.exe' has exited with code -1 (0xffffffff)."
This is my code below
public partial class MainPage : PhoneApplicationPage
{
Appointments appointments = new Appointments();
// Constructor
public MainPage()
{
InitializeComponent();
appointments.SearchCompleted += new EventHandler(appointments_SearchCompleted);
SearchCalendar();
// Sample code to localize the ApplicationBar
//BuildLocalizedApplicationBar();
}
private void SearchCalendar()
{
appointments.SearchAsync(DateBox.Value.Value, DateBox.Value.Value.AddDays(1), null);
}
private void DateBox_ValueChanged(object sender, DateTimeValueChangedEventArgs e)
{
SearchCalendar();
}
void appointments_SearchCompleted(object sender, AppointmentsSearchEventArgs e)
{
if (e.Results.Count() == 0)
{
MessageText.Text = "no events for the selected day";
}
else
{
MessageText.Text = e.Results.Count() + " events found";
DateList.ItemsSource = e.Results;
}
}
Kindly help
Reply
Answers (
1
)
how to search number value in datagridview by textbox
Binding text files to datepicker