Paging for First, Next, Previous and Last in gridview


This Article explains how to do Paging for First, Next, Previous and Last in A GridView.

Insert HINDI Font from ASP.NET web page to SQL Server database

We are In many sites to save HINDI data in SQL data base. But is too difficult to insert HINDI font in data base.

Get Child window values to parent using javascript

Through this article we will try to popup a child window and from there we will try to return a row data and populate into parent page using javascript. 

How to go back to the same position in a given view inside a multiview


Multiviews are commonly used in pages, but one flaw is observed by users which is the following:Suppose you have web page using Multiview and which is too long that you have to use the vertical scroll bar to focus on a control in the bottom, and that you click on a link to select some data for example , which are dispalyed in a different view of the multiview.

How to apply/change CSS dynamically


Following is the sequence of Screenshot which depicts how the css is toggled dynamicaly using javascript. The CSS of the element is changed dynamicaly using javascript fuction.

HTTP Post from SilverLight application to a REST Service


  1. How to create REST service for JSON request and response format.
  2. How to create SilverLight Client, which will consume a REST service on JSON data format.
  3. How to POST data in JSON format from SilverLight client.

Using the AnyButton to Create Dynamic Image Buttons


We've all had that problem - designing our web sites to have a certain look and feel. Unfortunately, not every visitor will view the site the way you intended. This is due to the fact that different operating systems render native browser controls differently. The buttons in OS X have the aqua look while the buttons in Windows 2000 look gray and outdated.

Nested Repeater : Display hierarchal data in web form by using ASP.Net repeater


This below code shows how to display hierarchal data from multiple tables by using ASP.Net repeater control. This article shows hierarchal data from Categories, Products, Orders and Order Details tables of Northwind database.

ASP.Net Page Navigation using Workflow 4.0



In this Article, how Workflow 4.0 can be used to control page navigation in ASP.Net is explained. If you are new to workflow 4.0 please go through MSDN documentation to understand how it works since the scope of this article is limited to workflow creation.

How to show Alert and Confirmation Message box in ASP.NET

In this Article Beginners can learn how to display a Message Box in using JavaScript.

1. Alert Message Box:

This type of Message Box is used to give Alert Information to the User.This can be done by using 'alert' method. Use the Alert method in <script> </script> tags by using a function with method name. Call this function On 'Client click event in Button as follows in Below code.

Working with CSS


Cascading style sheets give we more control over the appearance and presentation of your pages. Using cascading style sheets, we can extend the ability to precisely specify the location and appearance of elements on a page and create special effects.

Manage Ads with AdRotator Control in ASP.NET 2.0


The AdRotator control available in ASP.NET 2.0 allows you to manage and run ads on a website. The ads can be image files (gif, jpg etc) only. The AdRotator control selects and displays an ad randomly each time a page is refreshed. The selection of the ad is done based on the priority you define in the ad settings file.

Outlook with .NET 2.0


Outlook Object Model Overview

For accessing the outlook and its features you have to add reference of Microsoft Outlook 11.0 object library Version 9.2 (COM component) to your project.This COM component provides various objects through we can access the outlook.

On-line Address Book in ASP.NET 2.0


This is an On-line Address Book project. Those who are new to ASP.NET or going for first project can learn a lot from this. This is a project to keep the address and other information. In our daily life we meet many people and we have to keep the information and addresses of these people. This project is very useful to keep the record.

Calling WCF Duplex service in Silverlight


In a typical Silverlight application, a client web service requests a web service and waits for the response from the service and then processes it. This is distinctly a one way communication, in which a client must initiate every conversation.

ImageMap control in and Defining Hot Spots for it


ImageMap is a server side control, which allows you to display an image and take an action when a particular part of the image is clicked. Think about that; you are working on a Car sales website for a reputed car manufacturing company. And, your client asks to display a nice picture of your car model in one page and when the user clicks the parts of it (the car), the details about the part is displayed on the next page. ImageMap will fulfill this need.

Read All Notepad Files in a folder and merge all notepad files DATA in . aspx page

In this article, trying to fetch data more notepad file’s of a folder and merge them on an aspx page. In this sample article 45 notepad files are used, firstly read them and then merge all files and write on a .aspx page. It’s a fast way to assemble all files to in a one webpage. 

Optimizing Crystal Reports for Asp.Net


Implementing and embedding Crystal Reports in the .Net environment is extremely easy to do. Once the tools are downloaded from the businessobject website creating and editing reports from Visual Studio is a breeze. We are going to be covering the caching functionality that the Crystal Report framework provides through the ICachedReport interface.

Extension Methods in C#


Extension methods make it possible to write a method to a class that doesn't offer the method at first. You can also add a method to any class that implements a specific interface, so multiple class can make use of the same implementation.

Adding Cloud Service project to existing ASP.Net Web Application


Imagine that we are moving an existing Web Application or ASP.Net MVC Web Application to cloud. In that case we need to add cloud service to an existing Web Application or ASP.Net MVC Web Application.
We have a solution for Web Application as below.
Now right click on the solution and add a new project in the same solution. Choose Windows Azure project from the installed template and then choose a ASP.Net Web Role.
In role selecting window do not select any role and click on Ok. See the image below.
Now you can see in solution explorer that a Windows Azure project is being added.
After creating a Windows Azure project we need to associate an ASP.Net Web Application project to Window Azure. So to do so, right click on Roles in Windows Azure Project and select add and then choose Web Role Project in solution option.
Then you will get the project in the solution. Press ok.
On clicking of Ok, Visual studio will update csdef and cscfg file for the Web Role.


How to Access/Manipulate HTML Elements/Javascript in Silverlight


Interacting between HTML and ASP.NET has been one of the most common coding scenarios we have come across; i.e. accessing HTMLl elements and calling JavaScript from code behind.To add Silverlight content to an existing page and allow the HTML and Silverlight portions of the page to interact.

When we need this interaction: So let us see initially what could be probable scenarios where we need to interact / access HTML in Silverlight page.
  1. To make compatible: When we want to use the latest and greatest user interfaces with Silverlight, this requires compatibility with HTML. Situations could be like including a Silverlight content region to show non-essential extras alongside the critical HTML content.
  2. Legacy web pages: If we have an existing web page that does exactly what we want, it may make more sense to extend it with a bit of Silverlight pizzazz than to replace it outright. So the solution is to create a page that includes both HTML and Silverlight content.
  3. Server-side features: We know that Silverlight is a poor fit for tasks that need to access server resources or require high security, which is why it makes far more sense to build a secure checkout process with a server-side programming framework like ASP.NET. But you can still use Silverlight to display advertisements, video content, product visualizations, and other value-added features in the same pages.

So, let's try to BRIDGE this gap between Silverlight and the ordinary world of HTML.

What is this BRIDGE: This BRIDGE is built using a Silverlight set of managed classes (commonly called Helper classes) that replicate the HTML DOM (document object model), and we can access these classes by namespace, System.Window.Browser.

What are these Classes and what they do?


Ok, so let's start using these classes to interact with HTML from Silverlight page.

Step 1: Create a Silverlight application and name it BrowserInteraction.

Step 2: Open main.xaml; in this project we will use multiple classes so to demonstrate each functionality; we will create a listbox to display functionality and a border to see the result.

Step 3: Create a Listbox and a border (Border is a content control, so we call show control which will display result), so the xaml looks like this:
<Grid x:Name="LayoutRoot">        <Grid.RowDefinitions>            <RowDefinition Height="*"></RowDefinition>            <RowDefinition Height="Auto"></RowDefinition>            <RowDefinition Height="3*"></RowDefinition>           
        <ListBox x:Name="lst" SelectionChanged="lst_SelectionChanged">            <ListBoxItem Content="BrowserInfo"></ListBoxItem>            <ListBoxItem Content="ReadHTMLtag"></ListBoxItem>            <ListBoxItem Content="PlayWithHTMLElement"></ListBoxItem>        </ListBox>      <controls:GridSplitter Margin="0 3 " HorizontalAlignment="Stretch" Height="2"                             Grid.Row="1"                             ></controls:GridSplitter>        <Border BorderBrush="SlateGray" Grid.Row="2" x:Name="PagePlaceholder" BorderThickness="2"                Background="AliceBlue"                ></Border>    </Grid>
Step 4: Add silverlight page as a new element. Here we will use it to show browser information.

Write this xaml;
<UserControl x:Class="BrowserIntegration.BrowserDetail"    xmlns=""
    Width="400" Height="300"  Loaded="UserControl_Loaded">
    <Grid x:Name="LayoutRoot" Background="White" Margin="10">        <TextBlock x:Name="lblInfo" TextWrapping="Wrap" ></TextBlock>    </Grid></UserControl>

Step 5: In browserdetail.xaml.cs, add namespace
using System.Windows.Browser

Step 6: Write handler for UserControl_Loaded
 private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
     BrowserInformation b = HtmlPage.BrowserInformation;
     lblInfo.Text = "Name: " + b.Name;
     lblInfo.Text += "\nBrowser Version: " + b.BrowserVersion;
     lblInfo.Text += "\nPlatform: " + b.Platform;
     lblInfo.Text += "\nCookies Enabled: " + b.CookiesEnabled;
     lblInfo.Text += "\nUser Agent: " + b.UserAgent;
Step 7: Go back in mail.xmal.cs and write a handler for listbox to call Browserdetail.xaml.
private void lst_SelectionChanged(object sender, SelectionChangedEventArgs e)
     string newpage = ((ListBoxItem)e.AddedItems[0]).Content.ToString();
     Type type = this.GetType();
     Assembly asm = type.Assembly;
     UserControl Page = (UserControl)asm.CreateInstance(type.Namespace + "." + newpage);
     PagePlaceholder.Child = Page;

You can also use Navigation framework to call other Silverlight page. 


How to Create Excel file in ASP.NET C#


You can create Excel file using
  1. OpenXML
  2. Microsoft.Office.Interop.Excel

How to Show PDF file in C#


We know that PDF is not Microsoft technology; it is created by Adobe system and widely used for document exchange, and based on post script. The .Net framework does not provide a library to easily handle PDF files in .Net.

Understanding Isolated Storage in Silverlight


In the previous article we learned the fundamentals of Isolated Storage and how to write to files in isolated storage using the same classes you use for ordinary file access in a .NET application, such as StreamWriter and BinaryWriter.

Working with Isolated Storage in Silverlight


Isolated storage gives you access to a small segment of hard-disk space, with certain limitations. For example we don't know exactly where our files are being stored. We also can't read the files left by another Silverlight application or recorded for another user.

Working with Routed Event in Silverlight


In .NET we all are familiar with events, which are messages that are sent by an object, which can be any Silverlight element, like button, textbox etc., to notify code that something significant has happened. So in a typical .NET application, the control which fires an event also raises it / handles it. 

Importance of TimeZoneInfo class in ASP.NET


You are working on an ASP.NET application which is hosted in a server in a USA time zone.You need to send an email to your customers daily at 10 AM in the Singapore time zone. How is that possible?

JavaScript and CSS Minifier


The CombineAndMinify package discussed here automatically speeds up the loading of JavaScript files, CSS files and or images (loaded from image tags or from CSS files). The result can be a dramatic improvement in ASP.NET performance.

Applying Custom Filtering with AutoCompleteTextbox in Silverlight


The AutoCompleteBox fuses a text entry with a drop-down list of suggestions. This feature is a common sight on the Web, powering everything from the search box on the Google homepage.

Silverlight OOB Application Installer


This article describes how to build a Tool for installing a Silverlight OutOfBrowser Application in WPF.