How can I scan a string to determine if it contains DBCS chars?
VB.NET Public Shared Function IsAsciiString(s As [String]) As Boolean Dim i As Integer For i = 0 To s.Length – 1 Dim ch As Char = s(i) If ch < 0 Or ch > 127 Then Return False End If Next Return True End Function ’IsAsciiString ’In Page_Load dim originalString as string = ‘a±’ Response.Write (IsAsciiString(originalString)) C# public static bool IsAsciiString(String s) { for (int i = 0; i < s.Length; i++) { char ch = s[i]; if (ch < 0 || ch > 127) return false; } return true; } //In Page_Load String originalString = ‘a±’ ; Response.Write (IsAsciiString(originalString));
How do I access the cache in the Global.asax
Use HttpRuntime.Cache
How to disable status bar messages for Hyperlink Controls
VB.NET HyperLink1.Attributes.Add(‘onMouseOver’, ‘window.status=’ ’; return true;’) C# HyperLink1.Attributes.Add(‘onMouseOver’, ‘window.status=’ ’; return true;’) ;
How can I change the scroll bar color
Use Style Sheet to change the color of scroll-bar body { FONT-SIZE: 8pt; COLOR: #000000; background-color: #EEEEEE; scrollbar-face-color: #EEEE99; scrollbar-highlight-color: #DDDDDD; scrollbar-shadow-color: #DEE3E7; scrollbar-3dlight-color: #FF6600; scrollbar-arrow-color: #006699; scrollbar-track-color: #EFEFEF; scrollbar-darkshadow-color: #98AAB1; }
How to change a Label element’s text in javascript
document.getElementById(‘Label1’).innerText = ‘Changed Text’;