In this web Programming tutorial we will learn that how we can add Printing functionality on our web page using javascript in a asp.net or simple html page. see the below code and just copy and paste it. Code to use in HTML part you want to prin…
In this web-healer.blogspot.com 's web programming tutorial we will learn that how we can Restart our computer by clicking on a button from our website. So below is the dream code just copy and paste it. and use it in your button's onClick ev…
In this web-healer.blogspot.com 's web programming tutorial we will learn that how we can shutdown our computer by clicking on a button from our website. So below is the dream code just copy and paste it. and use it in your button's onClick e…
In this web-healer.blogspot.com 's web programming tutorial we will learn that how we can show simple date and time on our web page in asp.net using c#. just copy and paste the below code. if (!Page.IsPostBack) { lbl_date.T…
In this web programming tutorial we will learn that how we can call a javascript function from server side in asp.net using c#. see the below simple code in which we are trying to call a radiobutton click event that is defined in Client side, but we …
In this web programming tutorial we will learn that how we can import our Gridview data into excel file by click on a link button from our webpage in asp.net using c#. protected void LinkButton1_Click(object sender, EventArgs e) { Resp…
In this simple web Programming tutorial we will learn that how we can clear all Controls available in a gridview by just one click instead clearing one by one. like as we clear a form's text fields or other form elements. just copy the below code…
In this simple web programming tutorial we will learn that how we can define a Session as string in asp.net using C# to assign it to a string veriable. see the written below code and just copy and paste it. string data = Session["Data_var&q…
In this web Programming tutorial we will learn that how we can find or access a control like label, Dropdown, radiobutton, textbox etc from a previous page and its value to use in current page from gridview in asp.net using c#. See the below code an…
In this programming Tutorial we will learn that how we can format amount string into money. below is the code just copy and paste and use it. string charges = "125.35"; lbl_charges_total.Text = string.Format("{0:###,###,##0.00}&quo…
In this web programming tutorial we will learn how we can add new column in a Gridview when there is no record and we want to show a proper message that there is no data against particular search in asp.net using c#. see the below code and copy and p…
In this web programming tutorial we will learn that how we can convert a string into money format in asp.net using c#. see the below code Total_amount.Text = string.Format("{0:###,###,##0.00}", Total_Amountdue);
In this web programming tutorial we will learn that how we can upload an image or file directly on FTP by using asp.net file uploader control in asp.net using c# see the below code it will help us by doing so.. just copy and paste. public void ftp…
In this web programming tutorial we will learn that how we can concatenate strings in asp.net using c#. just copy and paste the below code. string practice = "Adress1" + "," Karachi ", "state" + "4600";…
In this web programming tutorial we will learn that how we can use Javascript Prompt function on our web pages. see the below code and just copy and paste it as it is. Javascript Prompt Box
In this web programming tutorial we will learn that how we can upload a picture or photo in asp.net using c#. just copy and paste below code in you .cs file. protected void btn_upload_Click(object sender, EventArgs e) { imageflag = 1; …
In this web programming tutorial we will learn that how we can Upload Image or file on FTP in Asp.net File Uploader using c#. copy the below code in your .cs file. public void ftpfile(string ftpfilepath) { string ftphost = "your domain …
In this web programming tutorial we will learn that how we can prevent right click functionality in browser (this code snipit will work in all browsers).
In this web programming tutorial we will learn that how we can create an image button dynamically in asp.net using c#. see the below code and put it in your .cs file in page load event. protected void Page_Load(object sender, EventArgs e) { …
In this web programming tutorial we will learn that how we can add some text on an image in asp.net using c#.just copy and page the code and add it in your .cs file. using System.Drawing; using System.Drawing.Imaging; using System.Drawing.Drawing2D…
In this web programming tutorial we will learn about span tag by using it on a web page using html. span tag is used to provide an additional structure to an html document. It is used to group and apply style sheet to inline elements of a web page…
In this web programming tutorial we will learn that how we can use div tag in an html document or in a web page. div tag is normally used to define a section in an html document or in a web page div tag is a pair tag and must be used a closing tag i…
In this web programming tutorial we will learn that how we can use font tag in an html document or in a web page. this text is with Verdana font this text is with arial font this text is with helvitica font this text is with impact font …
In this web programming tutorial we will learn that how we can use different type of text format in an web page or in an html document. see the below code. here is the code to make text bold in order to make text bold output: in order to make t…
In this web programming tutorial we will learn that how we can use Line Break tag in an html document tag. Line breaks are used to decide where the text will break on a line or continue to the end of the window. it can be used to move the control t…
in this web programming tutorial we will learn that how we can use paragraph tag in an html document or in a web page. paragraph tag are used in a document to add text in such a way that it will automatically adjust the end of line to suit the windo…
in this web programming tutorial we will learn that how we can use heading tag heading in a html page. headings are very important part of any web page. it is used to display different type of heading in HTML document heading tag is a pair tag, …
in this web programming tutorial we will learn that how we can create a basic html page. just copy and paste the below code in any editor such as note pad and save the file as test.html. just double click to run the page. my first page …
in this we programming tutorial we will learn that how we can create random number in asp.net using c#. see the below code and just copy and paste. Random rand = new Random((int)DateTime.Now.Ticks); int numIterations = 0; numIteratio…
In this web programming tutorial we will learn that how we can re-write url in asp.net, as it is very important and common and most difficult task for an asp.net developer to re-write url. For URL Rewriting we are using URLRewriter.Net which is ava…
In this web programming tutorial we will learn that how we can send email from Gmail in asp.net using c#, see the below code and just copy and paste. protected void btnSendEmail_Click(object sender, EventArgs e) { //Create Mail Message Object wi…
In this web programming tutorial we will learn that How to make a button disable immediately when user clicks it in asp.net so that user cannot click multiple time. Code for body section Note: onclick event is calling javascript clien…
In this web programming tutorial we will learn how to add or PUT add copy to clip board button functionality on your html or asp.net page copy the below code in your html page. Enter Text And Click Button To Copy Text To ClipBoard…
In this web programming tutorial we will learn that how we can get or track real (orignal) IP address of visitor of our page. return !empty($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] : (!empty($_SERVER['HTTP_X_FO…
In this web programming tutorial we will learn that how we can access server side data using Json ajax call at client side using asp.net or php. see the below code and just copy and past in your .aspx or .php file. function BindPaymentRecord(txnI…
In this web programming tutorial we will learn that how we can generate barcode in asp.net using c#, as it is often used in different projects and web developers have to face problem, see the below code and just copy and past in your page. Code for …
In this web programming tutorial we will learn that how we can Writing a Text Files Line Counter in asp.net using c#, Bellow is the code, it's so simple that I'm lazy to explain, enjoy: DirectoryInfo dInfo = new DirectoryInfo(args[0]); F…
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 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…