Browse by Tags

All Tags » asp.net (RSS)

Replace null value databind item with default value by Stanly

Here’s the code to set default value to gridview/datalist itemtemplate if it is bound with null value or the dataset returns null value. < asp : TemplateField HeaderText ="Header"> < ItemTemplate > < asp : Label ID ="lbl_amt" runat ="server...
Filed under:

Remove Duplicate Words in C# using Regular Expression by Stanly

Any application which gets input from users or from any other application has the possibility of containing unnecessary and junk values.There are several other option to remove such duplicate values and here i have implemented using Regular Expressions...
Filed under: , ,

Send GridView as Excel attachment in Mail by Stanly

This code illustrates you how to send Gridview content as an Excel Attachment in Email. The Gridview Markup looks like this… <% @ Page Language ="C#" AutoEventWireup ="false" CodeFile ="GridMail.aspx.cs" Inherits ="GridMail" %> <! DOCTYPE html...
Filed under: , , ,

Prevent Flicker from Ajax CollapsiblePanelExtender on Postback by Stanly

Let’s see how to fix the flickering of the CollapsiblePanelExtender when collapsed is set to true ( Collapsed ="true") Here is my CollapsiblePanelExtender < cc1 : CollapsiblePanelExtender ID ="CollapsePanel1" runat ="server" SuppressPostBack ="true...
Filed under: , ,

Ajax AutoComplete Extender Content Overridden Issue by Stanly

While using AutocompleteExtender, we could notice where the other controls are been overridden and the autocomplete extender text being overlapped by the other controls near by.This could be overcome by calling the OnClientShown property of the AutocompleteExtender...
Filed under: , ,

Ajax AutoComplete Extender like Google by Stanly

You might have noticed while searching in Google, the search keywords will be bold. Let’s see how to perform this in ASP.NET. We can do this using JavaScript < script > function BoldChildren(){ var behavior = $find( 'AutoCompleteEx' ); var target...
Filed under: , ,

Convert Url String to Hyperlinks by Stanly

using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System...
Filed under: ,

Implementing Search In Datalist and Highlight Search Text by Stanly

Let us see how to highlight the search keywords to make it easy for the user to identify his search results better. To perform this am using the Regex function to Highlight the search keywords. This is the function used for highlighting .. protected string...
Filed under: , ,

Resize Images Without Loss Of Quality in ASP.NET by Stanly

To create a image Gallery for your site, you may need to re size your image before uploading. And here is an example for you to do it in code behind. Without losing the original quality of the image resizing can be done. Here am saving the image path...
Filed under: , , ,

Custom SEO Friendly Paging in Datalist like Google by Stanly

Let’s see how to do paging with Datalist in as Next, Previous and with customized Page numbers as that of Gridview. Here I have the following things.. i) A datalist dlCollegeList to which we are to implement the paging ii) Two Hyperlinks ( hyPrevious...
More Posts