Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Messagebox
Message
From
04/03/2011 09:42:19
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
04/03/2011 09:18:56
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
01502643
Message ID:
01502650
Views:
31
Are the results being displayed in a grid or something? If so, I'd rethink the MessageBox design and maybe go for more of a "No records were found" display in the grid. I put a MessageBox on one of the grids when there were no results and hated it.

>Hi
>
>I want to display a message when there are not results from a stored procedure
>
>I thought I could use
>
>MessageBox.Show
>
>but I get this error
>
>
>System.InvalidOperationException was unhandled by user code
> Message="Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application."
> Source="System.Windows.Forms"
> StackTrace:
> at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
> at System.Windows.Forms.MessageBox.Show(String text)
> at validation.export2.btnExportCSV0_Click(Object sender, EventArgs e) in D:\development\PsdGraphs\exportData.aspx.vb:line 113
> at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
> at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
> at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
> at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
> InnerException:
>
>so how can i display this message
>
>Thanks
Very fitting: http://xkcd.com/386/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform