Thursday, January 23, 2014

How to make a site off line in IIS

Launching a site or publishing a site doesn't mean that your work is over. The main thing called MAINTENANCE starts from here. And when the maintenance is going on you need to stop the site being used by user. So how you will you do that. If you don't know the trick that is the most difficult job to you, but you know this trick its the easiest  thing in .NET, IIS.

The trick called "App_Offline.htm".

Open a text editor like note pad or note pad++ and create a HTML page named 'App_Offline".

Wednesday, January 22, 2014

Animated Site Title using java script

Its a very interesting example that how you can make your site title moveable. Its very short and easy to code using java script. Lets have a look.

<script type="text/javascript">
var rev = "fwd";
function titlebar(val)
{
    var msg  = "Your title here | Animated Title Example";
    var res = " ";
    var speed = 100;

Monday, January 20, 2014

Make your own Keylogger using C#.NET

What is a keylogger ?

Its an application program which is used to get the all entered key from ones keyboard. usually it uses for the hacking purposes.

According to Webopedia :
A keylogger is a type of surveillance software (considered to be either software or spyware) that has the capability to record every keystroke you make to a log file, usually encrypted. A keylogger recorder can record instant messages, e-mail, and any information you type at any time using your keyboard. 
Here I will show this not to hack somebodies computers but to know the process.

So lets start to make our own keylogger.

How to send mail using C# in ASP.NET

Mail sending is a vital thing in web technology. In ASP.NET you have to follow a very few steps to send a mail from your email id to others. So how to send mail using C# in ASP.NET. Lets have a look..

You need to take help of two new classes. 
and a namespace has to be imported. 
  • using System.Net.Mail;
So lets check the code here.

Wednesday, January 15, 2014

Make Your Own Gravatar using C# in ASP.NET

Now a days its a style to use Gravatar (Globally Recognized Avatar) as default profile pictures in various websites. You can assign this gravatar in ASP.NET using AJAX Toolkit but if you are looking for the gravatar using your name or something other text then the following example is the best one for you.

Here I will show you how to convert a text into an image using C# in ASP.NET. For this we need to take class Graphics and to generate the bitmap we need class Bitmap.

So lets start.

First take a text box to take input the text from user and add a button to convert it into image

Tuesday, January 14, 2014

Convert IP Address into Url

To convert an IP (Internet protocol) address into corresponding Url (Uniform Resource Locator)  in C#, ASP.NET you need a help of IPHostEntry and  IPAddress class. Make an object of this call and call the Dns.GetHostEntry() class to find the HostName against the Url.

IPAddress addr = IPAddress.Parse("109.73.164.17");
IPHostEntry entry = Dns.GetHostEntry(addr);
Response.Write(entry.HostName.ToString());

entry.HostName.ToString() will return the host name of the ip address.

Get Page Title and Image from Url using C# in ASP.NET

Hi,
Today's topic is about to fetch the title and image of an Url (i.e. http://facebook.com). Here I will do this operation with the help of  regular expression. For regular expression you can refer this link.

So, the main logic behind to fetch the title is to get the page source and from there find the <title> tag, and put that into a string.

Add two namespaces in your page.

using System.Net;                                     // for webclient
using System.Text.RegularExpressions;     // for regular expression

Wednesday, January 8, 2014

Get data from repeater using CommandName and CommandArgument

Hi everyone,
previously I gave an example of how to get data from a repeater using javascript. Today I am going to describe how to retreive data from repeater using CommandArgument and CommandName.

CommandName and CommandArgumet are two different properties of a ASP server button and using those two we are doing this example.

<asp:Button ID="btn_details" runat="server" Text="Show Id"   CommandName="edit" CommandArgument='<%# Eval("ContactID") %>'/>

Here in the button, which is within the repeater, we are binding the CommandArgumet with the ID of the data table. And when ever the button is clicking the value is passing and with that ID you can do your necessary work(edit, delete etc.).

Tuesday, January 7, 2014

Configure IIS in your local machine

IIS stands for Internet Information Services.
To know about IIS you can follow this two links from Wikipedia and TechTarget  or you can visit official IIS site by Microsoft.

In this article I will show you how to configure the IIS(Internet Information Services) in your local machine to run websites.

First you have to set the IIS from your Control Panel. And for that go to Program section within control panel. Within program there is an option called Turn Windows Features On or Off.


Sunday, January 5, 2014

Get Data From Repeater Using Java Script To Edit And Delete Rows

Today I will show you how to retrieve data from repeater.

There are two ways to do that.
  1. Using UpdatePanel and FindControl by server side scripting.
  2. Using Java Script from client side scripting.
In this article I only show how to get the value using javascript.

So lets come to the example straight.

We will use one property of asp button and i.e. OnClientClick. Within this we can call a javascript function which is client side scripting.

Friday, January 3, 2014

WebMethod in ASP.NET using jquery and Ajax json

Here I will show you how to get data from a textbox and radio button in ASP.NET(C#) using jquery through webmethod.

For this tutorial you need to know about the webmethod, jquery and ajax.

For webmethod  you can follow this link.

Lets come to the example.

Here we have taken one textbox for user input and two radio button to check. And three label to show output. and a normal html button to submit.


Popular Posts

Pageviews