Blog Archives

Telerik RadGrid Client Side Binding Using JavaScript

Before going to start about the code, I would like to tell you something about Telerik. Well, Telerik adds magic in our application. Its a third party tool that enhances the functionality of asp.net. If you have never used telerik and want to know more, I would suggest you to go through below links:-
http://www.telerik.com/
http://visualstudiogallery.msdn.microsoft.com/05896521-cda2-4c2e-9f5d-e562fe5059b0

In this article I am going to tell you, how to bind Telerik RAD grid using java script.

Read the rest of this entry

Advertisements

How to handle multiple submit buttons on a single form – MVC Razor

In MVC, there is no click event like(Button_Click) for buttons, action is used to handle the post action of the buttons.

(There are various ways for handling multiple submit buttons on the same form but the best two are below)

Method 1: Handle all Submit Buttons post in one Action:

Example: Suppose we have to perform some mathematical operation like (Add, Substract, Multiply, Divide) with 2 numeric values.

For this case, we will create a form and add 2 TextBoxes and 4 submit buttons for each opeartion (Add, Substract, Multiply and Divide).

Read the rest of this entry

Introduction to Ajax Accordion Components

# Introduction:

The Accordion Control is a part of the Microsoft Ajax Toolkit. The Accordion is a web control that allows you to provide multiple panes and display them one at a time. The Accordion Control organizes your content into expandable Panes or Tabs which can be clicked to make the content of that Pane visible while hiding all the others. The Accordion is implemented as a web control that contains Accordion Pane web controls. Each Accordion Pane control has a template for its Header and its Content.

When used properly, the Accordion control can be a very effective UI element that can not only help you save costly screen real-estate, but will also make your site look more interactive and organized.

The Accordion control is one of the few independent or stand-alone controls in the Microsoft Ajax Toolkit. By standalone we mean that it does not extend the behavior of any existing ASP. Net control, and is instead implemented independently.

In this article we will learn how to use the Accordion Control in our websites, the different properties that can be modified to change the control appearance and the functionality that you can add.

Read the rest of this entry

Knockout.js: Pagination with ASP.NET Web API (or WCF service)

Introduction
In this article, I am trying to implement HTML table as a grid with pagination using knockout.js. This is the easiest way to get page wise data from server using ASP.NET Web API (or WCF service) and display them as a grid.

Before we jump in to this article, let’s have a look at the standard definition of Knockout.js and ASP.NET Web API:

Knockout.js is a JavaScript library that helps you to create rich, responsive displays and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on user’s actions or when an external data source changes), KO can help you implement it more simply and maintainable.

ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.

Read the rest of this entry

Knockout.js: Built in Bindings

Introduction:
The Built in bindings are built into knockout.js and facilitate binding to attribute for elements. We can use multiple bindings separated by commas.

The built in bindings are categorized as:

1. Bindings to control text and appearance

  • text
  • html
  • visible
  • css
  • style
  • attr

Read the rest of this entry

Knockout.js and Model-View-View Model (MVVM) Pattern

Introduction:
Knockout.js is a javascript library that helps us to create rich and responsive use interfaces with a clean data model.

Features:
1. Declarative Bindings – A simple way to bind a part of UI to data model.
2. Dependency Tracking – Automatically updates right part of UI when data model changes.
3. Templating – A simple way to make nested UIs as a function of view model data.
4. Trivially Extensible – With a just few line of code, we can implement custom behaviors as new declarative binding for easy reuse.

Read the rest of this entry

Basic points that can help to Improve Web Application Performance

1. Disable View State Of A Page If Possible:
Page that does not require any post back events can have the view State off. By default the “ViewState” property is enabled, we can disable it in two ways:
(a) At control level: by set EnableViewState property to false
(b) At page level: using <%@ Page EnableViewState=”false” %>

Advantage: It decreases the memory allocation on server.

2. Use of String Builder For Concatenation:
All operations we do on strings are stored in memory as separate references. When we modify our string, at run time it returns a new string, leaving the previous string as garbage collected. To stop creation of new references we should use string builder whenever concatenation is required.

Read the rest of this entry

%d bloggers like this: