How to remove the spaces in a given string?
Use the Namespace System.Text.RegularExpressions VB.NET Dim strval As String = ‘Jack and Jill’ Dim strnewval As String = Regex.Replace(strval, ‘ ‘, ”) Response.Write(strnewval) C# string strval = ‘Jack and Jill’; string strnewval = Regex.Replace(strval, ‘ ‘, ”); Response.Write(strnewval) ;
How can I sort a BoundColumn
Set the SortExpression to the Field Name
How can I have the first item in the radiobuttonlist selected
VB.NET RadioButtonList1.Items(0).Selected = true C# RadioButtonList1.Items[0].Selected = true;
Can I use IIS as an alternative way of configuring Custom error pages
Yes, you can. But the preferable way would be ASP.NET, as the ASP.NET custom pages are configured in XML based web.config (application configuration) file, resulting in easy (xcopy) deployment and management.
How to populate a listbox with the Column Names in a Table
VB.NET ’Populate the dataset Dim dc As DataColumn For Each dc In ds.Tables(0).Columns ListBox1.Items.Add(dc.ColumnName) Next C# //Populate the Dataset foreach (DataColumn dc in ds.Tables[0].Columns) { ListBox1.Items.Add(dc.ColumnName); }