Warning: First parameter must either be an object or the name of an existing class in H:\root\home\amrsaafan-001\www\nilebits\wp-content\themes\porto\inc\functions\general.php on line 1051

Warning: First parameter must either be an object or the name of an existing class in H:\root\home\amrsaafan-001\www\nilebits\wp-content\themes\porto\inc\functions\general.php on line 1051

Warning: First parameter must either be an object or the name of an existing class in H:\root\home\amrsaafan-001\www\nilebits\wp-content\themes\porto\inc\functions\general.php on line 1051
2007 | Nile Bits

Yearly Archives - 2007

Confirmation message upon deleting an item from GridView control in ASP.NET

Lots of users click the delete button within the GridView with no attention then the result is that the item will be deleted from the GridView, so we can add confirmation message to appear to tell the user "Are you sure you want to delete this item?". First of all we have to attach the javascript code...

Add static item to DropDownList web control after data bind in ASP.NET

Sometimes we need to add a static item to the top of DropDownList web control, such as "-- Please select --" or any other text. This static item will be removed and replaced with the items that comes from the data source you are using after calling DataBind() method.  To keep the static item you are...

String functions StartsWith and EndsWith are case-sensitive in .NET

Did you know that String functions StartsWith and EndsWith are case-sensitive even in VB.NET? You will need to make sure you are looking for the correct string, since 'abc' with case-sensitivity is different than 'ABC'. So, if your function is looking for 'abc', you must make sure that you make adjustments to the string, in...

Disable configuration inheritance in ASP.NET

Configuration inheritance is a very good feature of ASP.NET. It allows you to set configuration settings in the Web.config file of a parent application and have it automatically be applied to all of its child applications. But sometimes you do not want the child applications to inherit the configuration from its parent application, so you...

Get XPath of an XML node

There are lots of XSL templates out there that get a human readable path to a node. But none of them cover the case when there are more than one node of the same element at the same level. Please find below the code that get XPath of an XML node: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output...