Posts

Showing posts with the label server

How to use File Upload Control in ASP.Net

How to use FILE Upload Control in ASP.Net Page  ??? File Upload Control has given a great flexibility to Web Programmers by allowing to show the Disk Contents of Client Machine and also makes it available to be saved on Server, so that may be retrievece and used later on as and when required. We will be understanding the concepts of this control with the help of example explained below: On your Page, Draw a FILE UPLOAD Control with a name "FileUpload1" and a Button having the Text  "Upload"  When the "Upload" button is clicked, you need o write following code which is meant to upload  only  JPG format image file     dim str as String     if     FileUpload1.hasFile   Then                                                                       ...

How to implement cookies to save your ID and Password (ASP.NET)

Image
"Cookies can be defined as a small text files that are created by Web Server and saved by Web Browser on Client's Machine" However, if clients machine has disabled 'Cookies' , the script to create & store cookies will lose its effect. Here, we are going to create a LOGIN page, that ask user to enter it's ID and PASSWORD. Also, if user selects, 'Keep me Signed in' for next visit, we'll save its ID & Password Following are the name of controls on our LOGIN Page: 1. idlbl for Your Id Label 2. idtxt for textbox where User ID will be entered. Also set its AUTOPOSTBACK property to TRUE 3. passlbl for Password Label 4. Passtxt for textbox where password will be entered. 5. loginbtn for LOGIN button Write following declaration statement in General Section Dim uid as HttpCookie Write following code at LOGIN Button if checkbox1.chcked=true then     uid = New HttpCookie(idtxt.text)     uid.value=passtxt.text      Response.Cooki...