设置TextBox控件属性 ImeMode=Disable ShortcutsEnabled=False VB.NET Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown If e.KeyCode = Keys.Space Then e.SuppressKeyPress = True End Sub C# private void TextBox1_KeyDown(o
using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Web; namespace Test { public class StringReplace { //只保留字符串数字 public static string GetNumberAlpha(string source) { string pattern =