Friday, 31 October 2014



move up down rows in datatable



Description:-



In this example we explain that how to move rows up and down in datatable in asp.net. or Moving row of a DataTable up and down. Or interchange the position of DataRow in DataTable or change the index or position of the datarow in datatable in asp.net.

Sometime You will need to add an Order column, and assign the DataGrid with a DataView sorted by the Order column. In order to switch the position of rows, you will need to set the Order value of each row.

That was the real problem that I was faced before sometime and then now I wil solved it.my problem was that I want to arrane thje datarow in datatable. In my datatable's one coloumn is that "colorarea". And if colorarea's value in datarow is "cell" then its position remain same in datatable but colorarea's value is "row" then it's datarow position are moved to the last position of the Datatable rows.

So how to handle that's type of situation and so far we will demonstrate to move or change the position of the datarow in datatable in asp.net using c#.

 Dynamically Bind Data in Ajax Accordion Panel Bind Data to Accordion from databse


Restrict the size of File when Uploaded How to Restrict the size of File when uploaded by user


Moving row of a DataTable up and down in asp.net



move up down rows in datatable



Description:-



In this example we explain that how to move rows up and down in datatable in asp.net. or Moving row of a DataTable up and down. Or interchange the position of DataRow in DataTable or change the index or position of the datarow in datatable in asp.net.

Sometime You will need to add an Order column, and assign the DataGrid with a DataView sorted by the Order column. In order to switch the position of rows, you will need to set the Order value of each row.

That was the real problem that I was faced before sometime and then now I wil solved it.my problem was that I want to arrane thje datarow in datatable. In my datatable's one coloumn is that "colorarea". And if colorarea's value in datarow is "cell" then its position remain same in datatable but colorarea's value is "row" then it's datarow position are moved to the last position of the Datatable rows.

So how to handle that's type of situation and so far we will demonstrate to move or change the position of the datarow in datatable in asp.net using c#.

 Dynamically Bind Data in Ajax Accordion Panel Bind Data to Accordion from databse


Restrict the size of File when Uploaded How to Restrict the size of File when uploaded by user


Friday, 17 October 2014


convert HTML to plain text

Description:-



In this example we explain that how to convert Text to HTML in asp.net with c#. or how to convert HTML to Formatted Plain Text in asp.net.

sometimes we needs to display text from a file or database that contain a HTML text or string. This text may be entered by the user that has not been formatted for HTML. In these cases, the text must be converted.
.Net already provide the HttpUtility.HtmlEncode() method to encode special characters so that they will appear as expected in a web  browser.but problem is that , this method won't do anything with line breaks and paragraphs.

So When your application needs to convert or display unformatted text to Formatted Plain Text that contains multiple lines and paragraphs on a Web page, a little more work or code is required that we describe belows.
mvc example for display grand total in footer of webgrid Footer template in webgrid in mvc4

create awesome vertical menu using CSS Fancy vertical menu in CSS


How to Convert HTML to Plain Text in asp.net


convert HTML to plain text

Description:-



In this example we explain that how to convert Text to HTML in asp.net with c#. or how to convert HTML to Formatted Plain Text in asp.net.

sometimes we needs to display text from a file or database that contain a HTML text or string. This text may be entered by the user that has not been formatted for HTML. In these cases, the text must be converted.
.Net already provide the HttpUtility.HtmlEncode() method to encode special characters so that they will appear as expected in a web  browser.but problem is that , this method won't do anything with line breaks and paragraphs.

So When your application needs to convert or display unformatted text to Formatted Plain Text that contains multiple lines and paragraphs on a Web page, a little more work or code is required that we describe belows.
mvc example for display grand total in footer of webgrid Footer template in webgrid in mvc4

create awesome vertical menu using CSS Fancy vertical menu in CSS


Friday, 3 October 2014


Regex Validation for Datetime

Description:-




In this example we explain that how to validate Date format in dd/mm/yyyy in asp.net C# backend code at runtime validation using Regex validator provided by .Net Framework.

We all know very to validate any like Date,only number,required validation,Range validation is easily at client side but my problem is that it will be validated by runtime.

For example in my real project in which one form name like create report in which form one is dropdown and its contain three items like string,integer and Date. And second control is textbox and one submit button. Now condition is that if user select string item from dropdown list then only string are allow to enter in below Textbox control same like if user select Date item from dropdownlist then only user allow to enter Date only and it also in dd/mm/yy format and same for Integer items. So it is difficult task to validate at runtime for me at first time.and then finally I got the solution are described bellows.

Dynamically Bind Data in Ajax Accordion Panel Bind Data to Accordion from databse


Restrict the size of File when Uploaded How to Restrict the size of File when uploaded by user


Regex to validate date format dd/mm/yyyy in asp.net using C#


Regex Validation for Datetime

Description:-




In this example we explain that how to validate Date format in dd/mm/yyyy in asp.net C# backend code at runtime validation using Regex validator provided by .Net Framework.

We all know very to validate any like Date,only number,required validation,Range validation is easily at client side but my problem is that it will be validated by runtime.

For example in my real project in which one form name like create report in which form one is dropdown and its contain three items like string,integer and Date. And second control is textbox and one submit button. Now condition is that if user select string item from dropdown list then only string are allow to enter in below Textbox control same like if user select Date item from dropdownlist then only user allow to enter Date only and it also in dd/mm/yy format and same for Integer items. So it is difficult task to validate at runtime for me at first time.and then finally I got the solution are described bellows.

Dynamically Bind Data in Ajax Accordion Panel Bind Data to Accordion from databse


Restrict the size of File when Uploaded How to Restrict the size of File when uploaded by user


Gridview with Fixed Header


Description:-



In this example we explain that how to display Gridview with Fixed Header and scrollbar in asp.net using jquery. Or scrollable Gridview with Fixed header in asp.net.

We all know that Gridview is the most important control in Asp.Net to display data in table format. So if  we have a large number of record that we want to display to the user so first we will make gridview with scrollable because of small portion of the webpage.the issue is solved but main problem is that Gridview Header will remain at the top always. So in simple scollbar the griview header will not display at top when you scroll the gridview to show next records.

So how to scroll only body of the gridview and header will remain same at top. To do this here we demonstrate display gridview with fixed header using jquery in asp.net

Dynamically Bind Data in Ajax Accordion Panel Bind Data to Accordion from databse


Restrict the size of File when Uploaded How to Restrict the size of File when uploaded by user


GridView With Fixed Headers in Asp.Net Using C# and jQuery

Gridview with Fixed Header


Description:-



In this example we explain that how to display Gridview with Fixed Header and scrollbar in asp.net using jquery. Or scrollable Gridview with Fixed header in asp.net.

We all know that Gridview is the most important control in Asp.Net to display data in table format. So if  we have a large number of record that we want to display to the user so first we will make gridview with scrollable because of small portion of the webpage.the issue is solved but main problem is that Gridview Header will remain at the top always. So in simple scollbar the griview header will not display at top when you scroll the gridview to show next records.

So how to scroll only body of the gridview and header will remain same at top. To do this here we demonstrate display gridview with fixed header using jquery in asp.net

Dynamically Bind Data in Ajax Accordion Panel Bind Data to Accordion from databse


Restrict the size of File when Uploaded How to Restrict the size of File when uploaded by user


validate checkbox in gridview

Description:-



In this example we explain that how to check atleast one checkbox is checked or not in gridview checkbox in asp.net using javascript and jquery. Or how to validate to check at least one checkbox is checked in the Gridview in ASP.NET using JQuery.

This is common requirement in every webforms in application like in Gridview we provide facility to end user to delete multiple rows in gridview by selecting or checked checkbox in gridview. So there is a requirement when user click on delete button at that first we must have to validate or check that atleast one checkbox is checked in gridview or not. If user not checked any checkbox in gridview and directally click on Delete button then proper alert message will be display like "please select/check atleast one checkbox row that you want to delete".

So how to perform or validate checkbox is checked or not in gridview in asp.net using javascript/jquery.

Dynamically Bind Data in Ajax Accordion Panel Bind Data to Accordion from databse


Restrict the size of File when Uploaded How to Restrict the size of File when uploaded by user


Validate at least one Checkbox is checked or not in GridView using JQuery

validate checkbox in gridview

Description:-



In this example we explain that how to check atleast one checkbox is checked or not in gridview checkbox in asp.net using javascript and jquery. Or how to validate to check at least one checkbox is checked in the Gridview in ASP.NET using JQuery.

This is common requirement in every webforms in application like in Gridview we provide facility to end user to delete multiple rows in gridview by selecting or checked checkbox in gridview. So there is a requirement when user click on delete button at that first we must have to validate or check that atleast one checkbox is checked in gridview or not. If user not checked any checkbox in gridview and directally click on Delete button then proper alert message will be display like "please select/check atleast one checkbox row that you want to delete".

So how to perform or validate checkbox is checked or not in gridview in asp.net using javascript/jquery.

Dynamically Bind Data in Ajax Accordion Panel Bind Data to Accordion from databse


Restrict the size of File when Uploaded How to Restrict the size of File when uploaded by user




WaterMark tex for texbox

Description:-



In this example we explain that how to create watermark text for TextBox in asp.net using javascript or jquery with css. Or create stylish or effective watermark text in textbox in asp.net.

Here we use jquery and css to create watermark text for textbox in this applicaton in asp.net.here we explain that how to set watermark text for asp.net textbox so user can easily understand what should to be enter in textbox at the time of fillup form.

So how to create fancy watermark text for textbox using javascript/jquery with css in asp.net are as follows

Dynamically Bind Data in Ajax Accordion Panel Bind Data to Accordion from databse

Restrict the size of File when Uploaded How to Restrict the size of File when uploaded by user

Create watermark text for TextBox in asp.net using javascript or jquery



WaterMark tex for texbox

Description:-



In this example we explain that how to create watermark text for TextBox in asp.net using javascript or jquery with css. Or create stylish or effective watermark text in textbox in asp.net.

Here we use jquery and css to create watermark text for textbox in this applicaton in asp.net.here we explain that how to set watermark text for asp.net textbox so user can easily understand what should to be enter in textbox at the time of fillup form.

So how to create fancy watermark text for textbox using javascript/jquery with css in asp.net are as follows

Dynamically Bind Data in Ajax Accordion Panel Bind Data to Accordion from databse

Restrict the size of File when Uploaded How to Restrict the size of File when uploaded by user