Click here to Skip to main content
15,893,904 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there,

I have been struggling with this a while now. The scenario is that I am in a view controllers (and sometimes other views). I want to display a simple message for the web user, like a messagebox used in Forms. All the answers/solutions from DevExpress states to use a view controller and specify the message for the different buttons you want to use. And then using this you create typeof each time passing the value in. This is waaaaaaay overkill for me. :wtf:

I literally just want to display a simple message notification that something happened in different views and with different messages (Like a messagebox in winforms). :doh:

I am currently using UserFriendlyException. The problem with this is (logic) a negative message etc. and it is a EXCEPTION. So it stops right there and breaks out of the code. :confused:

Any help will be appreciated. :rolleyes:
Posted
Updated 24-Apr-14 21:45pm
v2

1 solution

I solved it myself :doh:

The solution is to use a script for those wondering...

C#
WebWindow.CurrentRequestWindow.RegisterClientScript("ShowAlert", @"alert('message here');");  
 
Share this answer
 
Comments
Member 11285432 4-Dec-14 4:32am    
You are my Jesus. Thank you
CBadger 4-Dec-14 5:10am    
It is my greatest pleasure :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900