We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Get text (not value) of MaskEdit in Controller POST method

Thread ID:





130505 May 16,2017 11:24 AM UTC May 18,2017 01:25 PM UTC ASP.NET Core 1
Tags: MaskEdit
Gregory Perozzo
Asked On May 16, 2017 11:24 AM UTC


I need to get MaskEdit's text in my controller method.

I can get its value using 'Parameters' as you said in Get values on postback
But I'm not able to get its text, because I want the string with the masked text and not just the pure text.

This is my MaskEdit:

<ej-mask-edit asp-for="Plate" id="maskedPlate" mask-format=">AAA-AAAA" input-mode="@InputMode.Text" />

And this is my post method:

        public async Task<ActionResult> Create(string maskedPlate)

Can you help me?

Karthik Ravichandran [Syncfusion]
Replied On May 18, 2017 01:25 PM UTC

Hi Gregory, 
Thanks for contacting Syncfusion support. 
We have checked your query. We have maintained the strippedValue (i.e with out mask) in the maskedit element and hidden input. So, in form post back it will return the value with out masks only. To achieve your requirement you can maintain the new hidden input and update the value in that with mask by using the method get_UnstrippedValue(). Please refer the below code block. 
<ej-mask-edit ej-for="@Model.inputmode" id="maskedPlate" mask-format=">AAA-AAAA" input-mode="@Syncfusion.JavaScript.InputMode.Text" create="oncreate" change="onchange"/> 
function oncreate(args) { 
    var hidden = "<input type = 'hidden' id='custom" + this.element.attr('id') + "' name='" + this.element.attr('id') + "_hidden1' />" 
function onchange(args) { 
    $('#custom'+ this.element.attr('id')).val(this.get_UnstrippedValue()); 
public IActionResult Index(FormCollection collection) 
    string name = Request.Form["maskedPlate_hidden1"]; 
    return View(); 
For your convenience, we have attached the sample below, 
Please let us know if you need further assistance in this. 
Karthik R 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon