Skip to main content

Posts

Showing posts from July, 2013

Format your Pen drive With CMD

Here is the Tutorial to Format your Pen drive which write protected : Step 1: Open CMD : (Start - >Type CMD -> Press Enter) Step 2: Type "diskpart" and press Enter. If it ask allow Access - Press YES.     Step 3: Now a New CMD wil open, Type "list disk"     It will list all your connected drive. Step 4: Select the drive of your pen drive. Type "select disk #' Note : # is the number of your drive. In this Screenshot i not connected my pen drive, so i selected my Hard disk which is "0"     Step 5: Type "attributes disk clear readonly" Done !! - Now your Pen Drive is Formatted !! By Jay Nagar

Easy Sending G_M@IL Code in Project

public void SendEmail()         {             try             {                 var fromAddress = new MailAddress("Hacker Jay");                 var toAddress = new MailAddress(txtto.Text.Trim());                 const string fromPassword = "Jay007";                 string subject = Txtsubject.Text;                 string body = Txtmessage.Text;                 var smtp = new SmtpClient                 {                     Host = "smtp.gmail.com",                     Port = 587,                     EnableSsl = true,                     DeliveryMethod = SmtpDeliveryMethod.Network,                     UseDefaultCredentials = false,                     Credentials = new NetworkCredential(fromAddress.Address, fromPassword)                 };                 using (var message = new MailMessage(fromAddress, toAddress)                 {                     Subject = subject,                     Body = body                 })          

Login Form in ASP.Net with C#

Here, I’m going to describe  Login web Form  in ASP.Net. This article’s beauties are, it provide login for  Admin  and  User  both from  single table  according define role.  This demo is having proper  validation  and  Stay login . Steps are given below: Step 1:-  Create a table and fill records CREATE   TABLE  LoginAuthentication (       [id] [varchar] ( 50 )   Primary   Key ,       [pass] [varchar] ( 50 )   NOT   NULL,       [role] [int]  NOT   NULL ) Note:-  Here role  1  means  Admin  Login and  0  means  User  Login Step 2:  Take three web pages namely “ Login . aspx ”, “ Admin . aspx ” and “ User . aspx ” Step 3:-  Add  Connection String  in  web.config  file <configuration>                 <connectionStrings>                                  <add name="dbconnection" providerName="System.Data.SqlClient"                                     connectionString="Data Source=.;Initial Catalog=avi;User Id=avis

Best Books