How to include placeholder chars in string
I am trying to make mask for an IP address, but I want to model string be bundled with dots.
When My mask looks like
Mask="[0-2][0-9][0-9].[0-2][0-9][0-9].[0-2][0-9][0-9].[0-2][0-9][0-9]user see dots but string is binded without dots, bidned sting has onli numbers
I did try set mask as
Mask="[0-2][0-9][0-9][.\\.][0-2][0-9][0-9][.\\.][0-2][0-9][0-9][.\\.][0-2][0-9][0-9]"
Mask requires dot but user do not see it in input
How we can set input mask to bind placeholders on sting
Thanks in advanced
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
SN
Sevvandhi Nagulan
Syncfusion Team
September 18, 2020 11:47 AM UTC
Hi Admir,
Greetings from Syncfusion support.
We checked the reported requirement. We would like to inform you that if we use the provided mask, then we can get the value with the dots. Refer to the screenshot below,
Screenshot:
Please find the sample below,
If we have misunderstood your please provide the further details of your query to proceed.
Regards,
Sevvandhi N
AH
Admir Hodžic
September 18, 2020 01:04 PM UTC
Thank you on trying to help,

But your sample does not shows predefined dots in mas.
Mask accepts dots as requierd posions but it does not shows
What I am trying to do .
Is to my mask showing dots and also to binding dots
And to binded value be
255.255.255.0
SN
Sevvandhi Nagulan
Syncfusion Team
October 7, 2020 02:42 PM UTC
Hi Admir,
If you want to display the mask character includes “.” separator, then we suggest you to change the mask pattern as mentioned below.
|
<SfMaskedTextBox @bind-Value="value" Placeholder="Enter value" Mask="[0-2][0-9][0-9].[0-2][0-9][0-9].[0-2][0-9][0-9].[0-2][0-9][0-9]" FloatLabelType="@FloatLabelType.Always"></SfMaskedTextBox>
|
Also, we would like to inform you that Value property of the Masked TextBox component having the value without mask character. If you want to get the value along with mask character, we suggest you to use our GetMaskedValue method as mentioned in the below code example and screenshot.
|
@using Syncfusion.Blazor.Inputs
@using Syncfusion.Blazor.Buttons
<SfMaskedTextBox @ref="MaskObj" Placeholder="Enter value" Mask="[0-2][0-9][0-9].[0-2][0-9][0-9].[0-2][0-9][0-9].[0-2][0-9][0-9]" FloatLabelType="@FloatLabelType.Always"></SfMaskedTextBox>
<SfButton Content="Click to get Mask Value" OnClick="OnClick"></SfButton>
@code {
SfMaskedTextBox MaskObj;
public string maskedValue { get; set; }
public async Task OnClick()
{
maskedValue = await this.MaskObj.GetMaskedValue();
}
} |
Please find the sample from the below link.
Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/mask_char-1242560834
Regards,
Sevvandhi N.
Marked as answer
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
- Marked answer
-
AH Admir Hodžic
- Sep 17, 2020 02:12 PM UTC
- Oct 7, 2020 02:42 PM UTC