Skip to main content
Home Forums General Silverlight Installation and Setup Alert message show excepton
7 replies. Latest Post by Jonathan Shen – MSFT on July 3, 2009.
(0)
satyajit...
Member
85 points
40 Posts
04-28-2009 7:42 PM |
hello Friends
Can any body tell me the reason :
In silverlight 2.0 when we press enter above any Alert message or MessageBox.Show then it would be sometime show excepton
The Exception is : "Exception of type 'System.ExecutionEngineException' was thrown."
How to solve this Problem ?
Thanks
HarshBar...
Star
9908 points
1,719 Posts
05-02-2009 5:28 AM |
Can you provide code to reproduce this issue.
Jonathan...
All-Star
23562 points
2,304 Posts
05-04-2009 11:32 PM |
Hi Satyajit,
I guess you call this on its KeyDown event. Please take a look at this thread. Please use the below code snippet and have a try.
Dispatcher.BeginInvoke(new AsyncDelete(deleteFunction), new object[]{ids});public delegate void AsyncDelete(object obj);public void deleteFunction(object obj){HtmlPage.Window.Invoke("DeleteAnnotationsById", (string)obj);}If it doesn't work, please feel free to let me know with a tiny repro.
Best regards,
Jonathan
05-11-2009 9:35 AM |
The error is arise for
When someone press enter more than two time when this messagebox show message
We are handle the exception by focus on other controls for any keydown event.
thank you for your suggestion
05-13-2009 8:57 AM |
05-14-2009 4:22 AM |
I got your empty reply. Did your problem persist there? How about add your MessageBox to deleteFunction block.
public void deleteFunction(object obj){
MessageBox.Show(strMsg); }
If it doesn't work, please share a tiny repro here.
jpark18
6 points
3 Posts
07-02-2009 2:20 PM |
Jonathan,
Here's your repro....
<
xmlns
x
Width
</
***Code Behind***
using
{
InitializeComponent();
}
If you want you can replace the HtmlPage.Window.Alert to Messagebox.Show It doesn't happen as consistently, but it does happen if you continue to press the enter button.
Steps to reproduce:
launch app
click button
dismiss modal popup by pressing the enter key
press enter again
repeat pressing the enter key until exception is thrown.
07-03-2009 6:48 AM |
Hi Jpark,
This is a known issue and has been fixed on Silverlight 3 RTW. I have tested it on a internal siverlight 3 version.