RadInputPrompt.Show("Enter the number", MessageBoxButtons.OK, message, InputMode.Text, textBoxStyle, closedHandler: (arg) =>
{
int okButton = arg.ButtonIndex;
if (okButton == 0)
{
//do some check before submit
if (string.IsNullOrEmpty(arg.Text))
{
MessageBox.Show("Please input the number.");
return; //??
}
//submit
}
else
{
return;
}
});
我的问题是:我在提交之前进行了一些数据验证(例如:仅数字,数字计数......)
如果来自用户的输入无效,我希望提示输入屏幕仍然可以保留。
如果我使用“return”关键字,它会回到主屏幕。
或者是否有任何其他验证方式(类似于 AJAX?)我可以在此提示界面上使用,而不是在代码隐藏页面上使用?
非常感谢!