Posts

Showing posts from 2014

Write Text in Notepad files Using Asp.net

                In asp.net Provide many Supporting Classes and Objects files. To write Text or data in Notepad Files Using Your Asp.net and windows Applications. Using StreamWriter Class to write a Text files in Notepad.    Using Class file  using  System.IO  and point to the Text files and open the text files. StreamWriter  streamwriter; streamwriter=  new   StreamWriter ( File .Open(Server.MapPath( "~/sample.txt" ),  FileMode .OpenOrCreate));         streamwriter.WriteLine( " ******************************** " );         streamwriter.WriteLine( "         Heading    " );   streamwriter.WriteLine( "          ***************        " );         streamwriter.WriteLine( "    Sub Heading      " );          streamwriter.WriteLine( "    Date:  "  +  DateTime .Now()   );          streamwriter.Close(); if you want view Notepad files in Web Browser Use Below Code After st

Tips for Protecting Your Email Privacy

Image
                                 Sending an email message is certainly more private than  posting on a social networking site, but email has its own dangers. Here are six tips to help you  communicate   without risking your privacy. The protection of  email  from unauthorized access and inspection is known as  electronic privacy . In countries with a constitutional guarantee of the  secrecy of correspondence , email is equated with  letters  and thus legally protected from all forms of  eavesdropping . 1.Use a Strong Password You  give  out  your  email  address  all  the  time;  it’s  not  really  private  information.  That  being  the  case,  the  only  thing protecting your account  from misuse is the password.  A malefactor who guesses your  too-weak password gains full  control of your email account.  Protect  your  account  with  a  strong password, especially if  you use a Web-based email provider like Gmail or Yahoo mail. 2. Beware Public PCs  If you check your emai

Insert Data Dynamically in SQL Server

Image
    In this tutorial see about SQL Server insert Data Dynamically. create a table   tbl_name       create table tbl_name(id int identity primary key ,name nvarchar (20),age int ) declare @ID as int set @ID=1 while (@ID<=5) begin insert into tbl_name values( 'name' + CAST (@ID as nvarchar (20)),@ID) print @ID set @ID=@ID+1 end Output:

Fix scanstyles does nothing in webkit/firefox Error

Image
In this section we can see about special type of Error in using web developers. In Internet Explorer Users get this Alert message load the website  scanstyles does nothing in webkit/firefox .   JavaScript that detects IE based on the user string now breaks in some browsers, as you might expect. This error was a result of one such problematic script.    Easy Way to Fix this Error in workspace. using this  curvycorners.src.js javascripts file.   One is Reset Your Internet Explorer Settings. This One is important to use Open the   curvycorners.src.js search and Find the Code as  curvyCorners . alert ( 'Scanstyles does nothing in Webkit/Firefox' ); And Remove the particular line in the javascripts file Save It. Runs Successfully without any Error.

Important Companies and Its Founders:

1. Who is the Founder of Google ? Larry Page & Sergey Brin 2. Who is Founder of Facebook?  Mark Zuckerberg 3. Who is Founder of Yahoo ?  David  Filo & Jerry Yang 4. Who is Founder of Twitter ?  Jack Dorsey & Dick Costolo 5. Who is Founder of Internet ?  Tim Berners Lee 6.Who is Founder of Linkedin ?  Reid Hoffman, Allen Blue&Konstantin Guericke 7. Who is Founder of Email ?  Shiva Ayyadurai  8. Who is Founder of Gtalk ?  Richard Wah kan 9. Who is Founder of Whats up ? Laurel Kirtz 10.Who is Founder of Hotmail ? Sabeer Bhatia 11.Who is Founder of Orkut ? Buyukkokten 12.Who is Founder of Wikipedia ? Jimmy Wales 13.Who is Founder of Youtube ? Steve Chen, Chad Hurley & Jawed Karim 14.Who is Founder of Rediffmail ?  Ajit Balakrishnan 15.Who is Founder of Nimbuzz ? Martin Smink & Evert Jaap Lugt 16.Who is Founder of Myspace ?  Chris Dewolfe & Tom Anderson 17.Who is Founder of Ibibo ?  Ashish Kashyap 18.Who is Founder of OLX ?  Alec Oxenford & Fabri

Power of Linux:

Image
1. Google, Facebook, Twitter and  Amazon are all powered by Linux. 2. 850,000 Android devices are  activated every single day, all  running Linux. That means 100 Android devices have come online  since you started reading this  post, all running Linux. 3. 700,000 TVs are sold everyday  most of which are running Linux. 4. 9 out of 10 world's supercomputers run Linux. 5. 8 out of 10 financial trades are powered by Linux

How to delete viruses from pen drive with out any soft

it's very cool tricks.i think it will be helpful tricks for everyone.so you want do it,follow this steps. Steps are here : 1). Connect your pendrive and do not open it by using autorun. 2). Open Run and type cmd and press enter. 3). In the Command Prompt, Type the drive letter of your pendrive(you can check it from my computer) and then press enter. 4). Type dir/w/o/a/p and press Enter. It will display list of files. 5). Now in that list search for virus files like: Autorun.inf New Folder.exe Bha.vbs Iexplore.vbs Info.exe New_Folder.exe Ravmon.exe RVHost.exe any other files with .exe Extension . * 6). If it contains any of the files above file then type attrib -h -r -s -a *.* and press Enter. 7). Delete each of that file using delete Command del filename (For exaple: del New_Folder.exe)

E Mail Inventor in the World

Image
Sabeer Bhatia    is an  Indian American   entrepreneur  who founded the  Hotmail email service and  Jaxtr . He grew up in Bangalore and had his early education at the Bishop's School in Pune and then at St Joseph's Boys High School in Bangalore.In 1988,he went US to get a bachelor degree at the  California Institute of Technology  after a foreign transfer from  BITS Pilani , Rajasthan. He earned a master degree in electrical engineering from Stanford University . After graduation, Sabeer briefly worked for Apple Computer as a hardware engineer and Firepower Systems Inc. While working there he was amazed at the fact that he could access any software on the internet via a web browser. He, along with his colleague Jack Smith, set up Hotmail on 4 July 1996.     Into the 21st century, Hotmail is the world's second largest e-mail provider with over 369 million registered users, a figure exceeded only by Google's Gmail service. As President and CEO, he guided Hot

Retrieve Dates between Selected Particular Dates In SQL Server

Image
In SQL Retrieve the Dates between Selected Particular Dates In SQL Server without using any database in SQL Server. SQL Code declare @startdate datetime ,@enddate datetime set @startdate= '7/01/2014 '; set @enddate= '7/19/2014' ; with alldates as ( select @startdate DateVal union all select DateVal + 1 from alldates where DateVal + 1 <= @enddate ) select DateVal from alldates; Output:

How to Declare Variable in SQL Server Stored Procedure

In this section in SQL Server see about How to declare variable in SQL Server Stored Procedure.In this Section Use NorthWind Database in our Sql Server.            Use declare  keyword to declare the variable @ConName set particular datatype. use set as assign the value from  Database selected queries. The Unique value as assign to the variable in the Stored Procedure. Finally Display the output use Print Keyword . Example create procedure proc_sample1 as  begin declare @ConName as varchar ( max ) declare @cuscount as int set @ConName=( select ContactName from Customers where CustomerID= 'DRACD' ) set @cuscount=( select COUNT (*) from Customers) print @ConName print @cuscount end Output Sven Ottlieb 91

How to Disable using Mouse Right Click Events

Image
    In this  Web Developing Language we can set particular Rights for the Users. To Disable Mouse Right Click Event In the Systems.For use Below JavaScript Code Inside the <head> Tag.In this code to use PHP, Asp.net,Html and other web Languages. In this Picture will shown press the Browser Right  Click Button is Disable. < head > < script   type = "text/javascript" >      var  message =  "Function Disabled......" ;      function  IE4() {          if  (event.button == 2) {             alert(message);              return   false ;         }     }

Apple Introducing new programming language Swift

Image
Apple Introducing new programming language Swift.  it is the one of the package of the Xcode 6 Beta IDE . In this Mainly designed for the OSX and IOS Operating Systems.      Swift language as like Apple systems mostly Used Language Objective C. Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast.Swift is the result of the latest research on programming languages, combined with decades of experience building Apple platforms. Swift has many other features to make your code more expressive: Closures unified with function pointers Tuples and multiple return values Generics Fast and concise iteration over a range or collection Structs that support methods, extensions, protocols. Functional programming patterns, e.g.: map and filter Download Book Materiel The Swift programming Language  

Join Two Fields In SQL Server 2008 or 2012

Image
   In SQL user can perform  to join two fields in SQL server 2008 or 2012.use the northwind Database. using to select Employee Table.                             select * from Employees To join Firstname and  Lastname as Name and select Birthdate,Address in the Employees Table. use the concat operator using + operator. set Alies field name use the as function   in the SQL Server. use the below code      select FirstName + ' ' + LastName as Name,BirthDate, Address from Employees get the Result as

What is Northwind database? How Its Work ?

Image
     The northwind database is a sample database included in  Microsoft Access  and SQL Server 2008. It's available as an optional download for SQL Server 2012 . The Database contain Tables and Data.It have consist the Stored Procedure for the Database.                 The Northwind database is basically just an example database that runs under SQL Server. This database is populated with data that represents an imaginary company’s sales data. It is a very common example database for SQL Server testing and sampling. Use the link  http://northwinddatabase.codeplex.com/releases/view/71634  To download the Database. Download Northwind.sql.zip pack. Use the first main think is create database name as  Northwind.                         create database Northwind; execute the SQL file after create a  database.

How To change URL name in Asp.net

Image
            In this Tutorial can perform to change URL name in Asp.net Using  urlMappings .for example   home.aspx in URL now we can change the URL name as Home in Using  the Asp.net Web.Cofig file . Add  < urlMappings > with  in the  < configuration >   < system.web >  tag set Enabled true        < urlMappings   enabled = " true " >      < add   url = " ~/Home "   mappedUrl = " ~/home.aspx "  />      < add   url = " ~/Lessionplan "   mappedUrl = " ~/lessonplan.aspx?mode=view "  />      < add   url = " ~/Reports "   mappedUrl = " ~/Report.aspx "  />    </ urlMappings > URL mapping enables developers to map one set of URL to other.For example you can map the URL so that URL http://localhost:60527/<Project Name>/home.aspx to http://localhost:60527/<project name>/Home Before UrlMappings   url is: http://localhost:60527/<Project N

Retrieve Date in GridView By dd/MM/yyyy Format In ASP .Net C#

< asp : GridView   ID = "gridexport"   runat = "server"   AllowPaging = "True"    visible = "true"            AllowSorting = "True"   AutoGenerateColumns = "False"   EmptyDataText = "No Records"                                                          OnPageIndexChanging = "view_PageIndexChanging"   >                  < Columns >                      < asp : TemplateField   HeaderText = "Date" >                          < ItemTemplate >                              <% #   DataBinder .Eval(Container.DataItem,  "attdate" ,  "{0:dd-MM-yyyy}" ) %>                          </ ItemTemplate >                      </ asp : TemplateField >           </ Columns >       </ asp : GridView >

Export Gridview Data into Excel in ASP.Net C#

Image
ASP.Net page < asp : GridView   ID = "gridexport"   runat = "server"   AllowPaging = "True"    visible = "true"            AllowSorting = "True"   AutoGenerateColumns = "False"   EmptyDataText = "No Records"                                                          OnPageIndexChanging = "view_PageIndexChanging"   >                  < Columns >                      < asp : TemplateField   HeaderText = "S.No." >                          < ItemTemplate >       <% #  Displaysnos( Convert .ToInt32( DataBinder .GetPropertyValue(Container, "RowIndex" ))+1)  %>                          </ ItemTemplate >                      </ asp : TemplateField >                                          < asp : TemplateField   HeaderText = "Date" >                          < ItemTemplate >                              <% #   Data

HTTP Response Status Codes

The following table contains the constants and corresponding values for the HTTP status codes returned by servers on the Internet. HTTP_STATUS_CONTINUE 100 The request can be continued. HTTP_STATUS_SWITCH_PROTOCOLS 101 The server has switched protocols in an upgrade header. HTTP_STATUS_OK 200 The request completed successfully. HTTP_STATUS_CREATED 201 The request has been fulfilled and resulted in the creation of a new resource. HTTP_STATUS_ACCEPTED 202 The request has been accepted for processing, but the processing has not been completed.

Validatation control in Phone Number Using Jquery

Html Phone Number: <input type='text' id='txtPhone'/> <span id="spnPnestats"></span> CSS: body {     padding: 10px;     font-family: Arial;     Font-size: 10pt; } span {     font-weight:bold; } JQuery: $(document).ready( function () {     $(' #txtPhone ').blur( function (e) {         if (validatePhone(' txtPhone ')) {             $(' #spnPnestats ').html(' Valid ');             $(' #spnPnestats ').css( 'color', 'green' );         }         else {             $(' #spnPnestats ').html(' Invalid ');             $(' #spnPnestats ').css( 'color', 'red' );         }     }); }); function validatePhone( txtPhone ) {     var a = document.getElementById( txtPhone ).value;     var filter = /^[0-9-+]+$/ ;     if ( filter .test( a )) {         return true ;     }     else {    

Solution for SQL Server 2008 Intellisense Problem

Image
 If Using SQL Server 2008 R2 or any version some users as Intellisense Feature Does not  Working Problem Arrived. But As solve Problem.             Using dbForge Tool To solve  the problems.                    To Download Click Here dbForge SQL Complete, v4.7 StandarddbForge SQL Complete, v4.7 Standard dbForge SQL Complete, v4.7 Standard dbForge SQL Complete, v4.7 Standard

Different Time Format In SQL Server

1.Get HH:mm:ss Time Format:       select convert ( varchar (10), GETDATE () ,108) as Time             Result:            Time           22:45:44 2.Get HH:mm:ss:mmm Time Format:       select   convert ( varchar (20), GETDATE () ,114)  as  Time             Result:            Time           22:45:44:887

Different Format in getdate() in SQL Server

            In this  SQL Server using  GETDATE () to find different type of the Date format will be get the date. 1.Get MMM dd yyy Date Format:       select convert ( varchar (10), GETDATE () ,100) as Today            Result:            Jun 27 201 2.Get MM/dd/yyyy Date Format:       select   convert ( varchar (10), GETDATE () ,101)  as  Today            Result:            06/27/2014 3.Get yyyy.MM.dd Date Format:       select   convert ( varchar (10), GETDATE () ,102)  as  Today            Result:            2014.06.27 4.Get dd/MM/yyyy Date Format:       select   convert ( varchar (10), GETDATE () ,103)  as  Today            Result:            27/06/2014

operation is not valid due to the current state of the object-ASP. Net Error

Image
Is the one of the  error in ASP .net Using Forms and fields it will happen in the  processing any events.      To Use Maximum Number Of Fields or Big Data using the Forms get this Error.           To Resolve this Error Using Web.Config file.            <appSettings>                <add key = "aspnet:MaxHttpCollectionKeys" value = "4000" /> </appSettings> Note: Default  aspnet:MaxHttpCollectionKeys value is 1000

Find Number Of Tables in Database

To use Count() function as Returns the Number of Rows or values of the Specified Column:        SELECT COUNT (column_name) FROM table_name; In this above code find Number Of Rows in Specified Columns. And we can find Number of Tables in the Database In SQL Server 2008 or 2012.         USE DB_news  -- DB_news as Database Name         SELECT COUNT (*) from information_schema.tables         WHERE table_type = 'base table'       It will Be Shown the Number of Tables in the Selected Database.