How to get the current filename
VB.NET Response.Write (Path.GetFileName(Request.PhysicalPath)) C# Response.Write (Path.GetFileName(Request.PhysicalPath));
How to get the physical path of a file
Use Request.Path
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;’) ;