Showing posts from March, 2012
Static Members One of the tricks about .NET classes is that you really use them in two ways. You can use some class members without creating an object first. These are called static members, and they’re accessed by class name.
In this web programming we will learn the use of foreach loop in C#. a foreach loop allows you to loop through the items in a set of data. With a foreach loop, you don’t need to create an explicit counter variable. Instead, you create a variable …
In this web programming tutorial we will learn that how we can write sql query for Inner join see the below inner join query, SELECT * FROM Products INNER JOIN Suppliers ON Products.SupplierID = Suppliers.SupplierID
In this Web Programming tutorial we will learn that how we can use IF and ELSE Condition in Jquery to show or Hide an element on a web form. below is the code: HTML Button Code: Below code will check if Div element is hidden than it will mak…
In this JQuery web programming tutorial we will learn that how we can hide an element on a page using jquery. in this example we will learn that by clicking on a button how we can hide div or any element using jquery. HTML button JQuery Code $(…
In this web programming tutorial we will learn that how we can remove css class on some elements here is the way using jquery $('#celebs tr.test').removeClass('test');
In this web Programming tutorial we will learn that how we can replace or Add a css Class to take effect on a specific table's row using jquery, Css Class we want to replace .test { background-color: #dddddd; color: #666666; } Jquery Code to…
In this web programming tutorial we will learn that how we can change the background color and text color of Table's alternate rows ie we want that Every "Even" Row's text color and background color of a table should changed using J…
In this web Programming tutorial we will learn that how we can print a string in reverse mode in asp.net using c#, for example you have a string as below string a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; and you want to print or show it in Rever…
In this web programming tutorial we will learn that how we can creat a image button dynamically in asp.net using c#. See the below code for your .cs file in my case i have created a print button you may create a button as per your requirements. I…
In this web Programming tutorial we will learn that how we can format a string to Monay type. see the below code in asp.net using c#. Code for .cs file Total_amount.Text = string.Format("{0:###,###,##0.00}", Total_Amountdue);
LINQ (Language Integrated Query) is a set of extensions for the C# and Visual Basic languages. It allows you to write C# or Visual Basic code that manipulates in-memory data in much the same way you query a database. Technically, LINQ defines about…
in previous article we explained that how to save files in sql server database using asp.net now we will learn that how to fetch images from sql server database in asp.net using c# below function in page load event will just fetch the image data fro…
In this web programming tutorial we will learn that how we can save files in sql server database and how we can fetch or retrieve saved files from sql server database in asp.net using c#. Below is the table structure in order to save files here i…
In this web programming tutorial we will learn that how we can calculate the row total and subtotal of gridview using jquery. …
In this web programming tutorial we will learn that how we can maintain scroll position of the page when page is postback. although asp.net framework provides us MaintainScrollPositionOnPostback but it has been observed that it is not working in Fire…
in this web programming tutorial we will learn that how we can convert text string provided by user into an image in asp.net using c#. this will help us to make our own captcha images instead to use third party tools. HTML Code to get text string fr…
in this web programming tutorial we will learn that how to use ASP.Net CompareValidator to compare dates in dd/mm/yyyy format. By default the ASP.Net CompareValidator does not work for dd/mm/yyyy format hence we will need to change the Culture prop…
To export the GridView as CSV, I am running a two for loops. While looping through the GridView columns and appending comma after each column and while looping through rows appending new line character. Refer the code below. protected void btnExport…
In this web programming tutorial we will learn that how we can export grid view data into a pdf file in asp.net using c#. For exporting the GridView to PDF I am using the iTextSharp Library. You will need to Add Reference for the iTextSharp Library …
In this web programming tutorial we will learn that how we can export grid view data into MS excel file in asp.net using c# Code for .cs file protected void btnExportExcel_Click(object sender, EventArgs e) { Response.Clear(); Response.Buffer = true…
In this web programming tutorial we will learn that how we can export data into MS word file from grid view by clicking a button in asp.net using c# Code for .aspx file Code for .CS file protected void btnExportWord_C…
In this web Programming tutorial we will learn that how we can validate the image at client side before uploading it that it is according to our required format i.e. png, jpg or bmp. Upload a valid image;
In this web programming tutorial we will learn that how can we resize the image while uploading to the server as per our requirements. code for .cs file using System; using System.Data; using System.Configuration; using System.Web; using Sys…
In this web programming tutorial we will learn that how we can reset all web form controls in one click ie (by clicking on reset button) in asp.net using c#. code for .cs file. public static void ResetControls(ControlCollection pagecontrols, bool tx…
in this web programming tutorial we will learn that how we can validate asp.net form fields using javascript. See the below function and use it as per your requirements. function validateregform() { if (document.getElementById(" ").value…
In this web programming tutorial we will learn that how we can export grid view's Data into an excel sheet in asp.net using c#. protected void BtnExport_Click1(object sender, ImageClickEventArgs e) { string attachment = "attachment; filenam…
In this web programming tutorial we will learn that how we can import export excel data in to sql server database in asp.net using c#. In certain occasions we may need to export / import large excel spreadsheet to SQL server database. Step 1: I am a…
In this web programming tutorial we will learn that how we can read a text file in asp.net using c# and how we can write some text or data on a text file in asp.net using c#. Reading and writing (File manipulation) is a very easy task in asp.net, in…
in this web programming tutorial we will learn that how we can disable the drag and drop and text selection facility on our web pages. in order to do so just put the below code in body section of your code: but there is one drawback of the above cod…
In this web programming tutorial we will learn that how we can check all check boxes in a page using jquery. Reason for Celebrity Famous on the internet Committed a crime Dates a super model Hosts a TV show Big in Japan Check all Jquery Code …
In this web programming tutorial you will learn how to redirect user after some time delay in asp.net using c#. Normally people use redirection process after showing some message to their users, for example a message can be "Thank you for visitin…
In this programming tutorial you will learn how to register dll. It is quite easy as you just have to execute a simple command, but before knowing the command you must have Administrator rights over the operating system (Windows). You just have to r…
In this web programming tutorial we will learn that how we can call or invoke our methods in asp.net using c#. Invoking your methods is straightforward—you simply type the name of the method, followed by parentheses. If your method returns data, you…
In this web programming tutorial we will learn that how to declare a private method in asp.net using c#. When you declare a method in C#, the first part of the declaration specifies the data type of the return value, and the second part indicates t…
In this web programming tutorial we will learn that how to declare a method with return type in asp.net using c#. When you declare a method in C#, the first part of the declaration specifies the data type of the return value, and the second part ind…
In this web programming tutorial we will learn that how we can declare methods in asp.net using c#. When you declare a method in C#, the first part of the declaration specifies the data type of the return value, and the second part indicates the met…
in this web programming tutorial we will learn that how we can use do while loop in asp.net using c#. You can also place the condition at the end of the loop using the do . . . while syntax. In this case, the condition is tested at the end of each pa…
Finally, C# supports a while loop that tests a specific condition before or after each pass through the loop. When this condition evaluates to false, the loop is exited. int i = 0; while (i
In this web programming tutorial we will learn that how we can use The for loop is a basic ingredient in many programs. It allows you to repeat a block of code a set number of times, using a built-in counter. To create a for loop, you need to specif…
In this web programming tutorial we will learn that how we can use switch statement in asp.net using c#. C# also provides a switch statement that you can use to evaluate a single variable or expression for multiple possible values. The only limitati…
The if statement is the powerhouse of conditional logic, able to evaluate any combination of conditions and deal with multiple and different pieces of data. Here’s an example with an if statement that features two conditions: if (myNumber > 10) { …
in this we programming tutorial we will know the list of operators in asp.net using c# Operator Description == Equal to. != Not equal to. < Less than. > Grea…
In this web Programming tutorial we will learn how to use Tree view in asp.net application.
HTML Code Browser View HTML Code Browser View HTML Code Browser View HTML Code Browser View HTML Code Browser View © © ! ! _ _  Û Ã› ® ® " " ` ` ž ž Ü Ãœ &a…
in this javascript web programming tutorial we will learn that how we can prevent Enter key to submit forms or perform any event in our web page. just copy and paste below java script in head section of you html page.
Hexadecimal Value - #FFFFFF RGB Color Code - R=255 G=255 B=255 #FFFFFF R=255 G=255 B=255 #FFFFCC R=255 G=255 B=204 #FFFF99 R=255 G=255 B=153 #FFFF66 R=255 G=255 B=102 #FFFF33 R=255 G=255 B=51 #FFFF00 R=255 G=255 B=0 #FFCCFF…