How to delete a file from the server?
VB.NET System.IO.File.Delete(Server.MapPath('wnew.txt')) C# System.IO.File.Delete(Server.MapPath('wnew.txt')) Make sure that you have permissions to delete a file.
How do I specify the Japanese locale for the controls in my Japanese localized page?
Just set the locale to Japanese in the Page directive. i. e Set the Culture= ‘ja-JP’ for the Page Directive. ASP.NET pages support Culture and UICulture attributes to support independent localized pages. Controls on pages can pick the culture of the page and can render culture-dependent content.
How to get the size of a byte array
VB.NET myByteArray.Length C# myByteArray.Length;
Why do I get the Error Message ‘System.OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown.’
It means that the server is out of available memory. You probably have an infinite loop somewhere that’s frantically creating large objects, or you forgot to dispose of disposable objects and memory slowly leaked.
How to get URL without querystring
VB.NET Dim stringUri As String = 'http://www.syncfusion.com/?id=1&auid=16' Dim weburi As Uri = New Uri(stringUri) Dim query As String = weburi.Query Dim weburl As String = stringUri.Substring(0, stringUri.Length - query.Length) Response.Write(weburl) C# string stringUri = 'http://www.syncfusion.com/?id=1&auid=16'; Uri weburi = new Uri(stringUri); string query = weburi.Query; string weburl = stringUri.Substring(0, stringUri.Length - query.Length); Response.Write (weburl);