MVC 3 Razor – Does Notification message box “X.Msg.Notify” works any types action Result?

  1. #1
  2. #2
    Hello!

    To do this you can try to handle exceptions:

    Razor:
    .Proxy(proxy => proxy.Add(Html.X().AjaxProxy()
    	.Listeners(l => {
    			l.Exception.Handler = "eval(Ext.decode(response.responseText).script)";
    		})
    	.Url(Url.Content("~/Test/AjaxSearch/"))
    	.Reader(reader => reader.Add(Html.X().JsonReader()
    							.Root("data")
    							.TotalProperty("total")))))
    
    	.Parameters(param => param.Add(Html.X().StoreParameter()
    					.Name("JSONFilters")
    					.Value("getSearchFilters()")
    					.Mode(ParameterMode.Raw)
    					.Encode(true)
    					))
    Controller:
    if (!IsRequestSuccess) // Simulation Error
    {
    	X.Msg.Notify("Title ", "A problem has been encountered and recorded. Please reference Id 1221 when contacting support.").Show();
    	return new DirectResult()
    		{
    			ErrorMessage = "Exception"
    		};
    }

Similar Threads

  1. [CLOSED] [RAZOR] Binding with complex types
    By mcfromero in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 07, 2012, 6:53 PM
  2. Replies: 24
    Last Post: Aug 06, 2012, 11:26 AM
  3. Replies: 6
    Last Post: May 11, 2012, 8:17 PM
  4. Replies: 0
    Last Post: Mar 02, 2011, 4:16 PM
  5. [CLOSED] [1.0] Result message of HttpWriteProxy
    By sidinwillis in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 05, 2010, 8:27 PM

Tags for this Thread

Posting Permissions