ASP pages that worked perfectly on Windows 2000 Server and IIS 5.0 do not work on Windows 2003 Server with IIS 6.0. ASP.NET pages work fine. Why?
Start -> Settings -> Control Panel -> Administrative Tools -> and double clicking IIS Manager. Go to the Web Service Extensions tab, click Active Server Pages, then press the ‘Allow’ button on the left
How to format a Telephone number in the xxx-xxx-xxxx format
VB.NET Dim Telno As Double = Double.Parse(ds.Tables(0).Rows(0)('TelNo').ToString()) Response.Write(Telno.ToString('###-###-####')) C# double Telno= double.Parse(ds.Tables[0].Rows[0]['TelNo'].ToString()); Response.Write(Telno.ToString('###-###-####'));
How to bind an ArrayList to a DropDownList
VB.NET Dim arrList As ArrayList = New ArrayList arrList.Add('Faq') arrList.Add('Tips') arrList.Add('Tricks') DropDownList1.DataSource = arrList DropDownList1.DataBind() C# ArrayList arrList = new ArrayList(); arrList.Add('Faq'); arrList.Add('Tips'); arrList.Add('Tricks'); DropDownList1.DataSource = arrList; DropDownList1.DataBind();
How to display full day names in a Calendar Control
Set the DayNameFormat= Full for the Calendar Control
How to read specific characters from a text file
Use namespace System.IO VB.NET Dim fs As New System.IO.FileStream(Server.MapPath('1.txt'), IO.FileMode.Open) Dim buffer(5) As Byte ’ 5=> number of characters to be read fs.Read(buffer, 0, 5) fs.Close() Dim filechars() As Char = System.Text.Encoding.ASCII.GetChars(buffer) Dim filestring As String = New String(filechars) Response.Write(filestring) C# FileStream fs =new FileStream(Server.MapPath('1.txt'), FileMode.Open); Byte[] buffer= new byte [5] ; //5 => Number of characters to be read fs.Read(buffer, 0, 5); fs.Close(); Char[] filechars = System.Text.Encoding.ASCII.GetChars(buffer); string filestring = new String(filechars); Response.Write(filestring);