This website was initially designed to share my personal stuffs. However,while
surfing on the net, I found many false derogatory and cheap remarks against Hinduism.
Being well versed in indian scriptures,I decided to include spiritual stuffs just
for spreading awareness. Though my articles are focussed on hinduism, there would
be no offensive or defamatory content against any religion. Respecting all gods
is the essence of hinduism. This is a non profitable website and is not affiliated
or associated with any religious organizations.
|
Home→Technical→Asp.Net
Technical Blogs
|
Call Codebehind method from GridView ItemTemplate Eval function
|
Posted By
sarinmall on
Apr 16, 2013 58 Views
|
Gridview is the most common control used in an ASP.Net application. Almost, every websites make use of gridview to display tabular data. Usually, this data comes from the database or xml file, which is then bounded to gridview control.
Each column of the data retrieved from the database is bound to fields (columns) of the GridView. This binding of database column with gridview column is done using Eval function. Normally, we directly bind the retrieved data from the database onto the gridview. But sometimes, it is desirable to tweak or modify the data before it is bounded to the grid column.
For Ex: Instead of binding FirstName and Lastname in two separate columns, I would like to bind it in a single column as FullName, which will display FirstName followed by lastName separated by space in between. Plus I would like to append Mr. or Mrs. depending upon the gender of the person.
|
|
Trigger custom or manual postback in ASP.NET
|
Posted By
sarinmall on
Apr 02, 2013 81 Views
|
One of the most important features of ASP.net is the ability of manually triggering the postback event onto the server. Post back is a process by which the request is posted onto the server based on the event generated by user action. For Ex: when the user selects a dropdown, a post back event is triggered.For all the server control except Button and ImageButton, postback is generated by the JavaScript function __doPostBack(). Button and imagebutton uses the client browser functionality to submit the content onto the server. For all other controls, Asp.net runtime automatically insert the definition of __doPostBack() function in the HTML output to initiate a postback onto the page.
|
|
Increase performance of your website using caching
|
Posted By
sarinmall on
Feb 06, 2013 209 Views
|
One of the best ways to improve performance of your website is to employ caching. Caching can be used to cache the whole page or a specific portion of your web page into memory. Caching can also be used to store the data where the data can be the records of your database. Caching helps us in avoiding the unnecessary database calls since the cached data can be used to display the retrieved results instead of calling the database for each user request.
|
|
Change attributes of HTML elements at runtime
|
Posted By
sarinmall on
Dec 13, 2012 200 Views
|
Very often, there is a need to set attributes of HTML elements from code behind. For example, there may be a separate home page for admin and normal business rulers. So, depending upon the logged on user, you may want to change the redirected page from code behind. In the below code, I have added the on click event to redirect to google.com
|
|
Binding Database columns with apostrophe
|
Posted By
sarinmall on
Nov 26, 2012 193 Views
|
In one of my project, I faced a situation of binding a database column to datagrid with apostrophe in its name. In such cases, the normal way of binding columns does not work.
|
|
Create property class of database table
|
Posted By
sarinmall on
Nov 23, 2012 187 Views
|
Recently while working on a project, I got the need of creating a class with properties as column names of a database table. If there was a need of only a single class, then I would have completed this requirement by writing code manually. But since I had the need of creating property class of many database table, I decided to search for some free third party tool.
|
|
Calling web service asynchronously using jquery ajax
|
Posted By
sarinmall on
Sep 17, 2012 188 Views
|
In this article, we will see how to get data from database using jquery ajax asynchronously. We will also see how to show the data retrieved from the database onto the web page using Json
Since we are going to use Json, it is very important to have a brief knowledge of json.
|
|
create new controls in grid view at runtime
|
Posted By
sarinmall on
Sep 09, 2012 202 Views
|
In previous articles, we saw how to change the background or foreground color of grid column or grid row. We also saw how to dynamically change the attributes of any cell or row including header cell/row and footer cell/Row. We also discussed on how to show the summary information in footer row. In this article, we will see how to create new controls in grid view dynamically and how to hide or show cells/row of grid view dynamically.
|
|
Changing Grid View header and footer at run time
|
Posted By
sarinmall on
Sep 08, 2012 184 Views
|
This article describes how to change the attributes of grid view header or footer at runtime. This is very significant since many customers’ demands for summary information at the bottom of the grid or many times, we feel the need of changing header attributes at runtime.
|
1 2 3
|
Good Thoughts
In times of great stress or adversity, it's always best to keep busy, to plow your anger and your energy into some
thing positive
-Lee Iacocca
|