Telerik Forums
UI for ASP.NET Core Forum
1 answer
100 views

I need to show the notification on my razor page. The message comes from the controller. Below is what I have:

 

 public ActionResult Index()
        {
           

            if (test == "Success")
                return View("Successfully stored);
            else
                return View("failed to store");
        }

 

On My razor page, I want to show the Success notification message when test is Success otherwise show the failure message. How can I achieve this. I don't want to click any button to show the success and failure notification.

Mihaela
Telerik team
 answered on 28 Aug 2023
1 answer
118 views

Hello,

is it possible to play a sound / beep / whatever when showing a notification box?

I haven't found anything in the API for ASP.NET Core.

Thanks,

Christine

Alexander
Telerik team
 answered on 28 Jul 2022
1 answer
507 views

In a Grid, I try to edit a Product, that should have a unique Code.

In that case, I need the remote validation, to test, if the edited code would exist already in the database, different, from the edited product, of course. 

For that, I need to send to the server the edited product Code, along with its Id.

In such cases, I would have an action like this, in the controller (documented here):

DTO:

[Remote(action: "VerifyCode", controller: "Products", AdditionalFields = nameof(ProductId))]
[Display(Name = "Product Code")]
public string Code { get; set; }

Controller:

[AcceptVerbs("GET", "POST")]
public IActionResult VerifyCode(string code, int id)
{
    if (!_productService.VerifyCode(code, id))
    {
        return Json($"The code {code} is already taken by another product but shoud be unique, please change the code.");
    }

    return Json(true);
}

how to perform such validation when editing the Grid? Ideally inCell edit, but at least in Popup Mode....

Mihaela
Telerik team
 updated answer on 14 May 2021
1 answer
247 views
Hi, I'm trying to use the Kendo Notification widget to add error/success messages to my page. Currently I'm using modelstate errors to display a quick message but I want to switch over to the kendo widget. My issue is I want to be able to set the notification message from the server side in the controller. Is there any way to easily access the notification widget from my controller?
Plamen
Telerik team
 answered on 08 Feb 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?