Tuesday 9 September 2014

multiple file upload php script

In this php tutorial let us check multiple file upload functionality using php script. This multiple file upload php script will help you to upload multiple files to your website very easily. This multiple file upload php script will also help you to restrict upload file type. Eg: you can tell the script to upload pdf file only, or upload pdf,jpg,doc file only ect by simply giving some configuring option. Let us check how you can write the code for uploading multiple file in detail. First of all let us check the html part. In the html we need a file uploading functionality. So The HTML code for multiple file upload is
<form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="files[]" multiple/>
<input type="submit" value="submit"/>
</form>
In the above html code it will give you an option to select multiple files. In the form for uploading files you need to specify enctype to multipart/form-data. This is an impotent think. if you didn’t give this option your file upload will not work. in the input field i specified name=”upload_files[]“ this is because if it will take care of multiple file upload_files[] will give an array of file names. also don’t forget to give multiple in the input filed. The next is the php section. In this php section we are going to write the php script to upload multiple file. Let us check it in detail.

function
upload_multiple_file($file,$file_dir="user_files") {

$overwrite=0;
$allowed_file_type = array("pdf","ppt","pptx","xls"."xlxs","doc","docx","jpg", "jpeg", "png", "gif");
$max_file_size_check=1;
$max_file_size = 2097152;

foreach($_FILES['files']['name'] as $fkey=> $fname){

$ext = pathinfo($fname, PATHINFO_EXTENSION);
if (!in_array($ext, $allowed_file_type)) {

return "unsupported file format";
break;
}

}

foreach($_FILES['files']['tmp_name'] as $key => $tmp_name ){

$file_name = $_FILES['files']['name'][$key];

$file_size =$_FILES['files']['size'][$key];

$file_tmp_name =$_FILES['files']['tmp_name'][$key];

$file_type=$_FILES['files']['type'][$key];

if($max_file_size_check < 1) {
if($file_size > $max_file_size){

$fsize=$max_file_size/1048576;
return    'File size must be less than '.$fsize.' MB';
break;

}
}

if(is_dir($file_dir)==false){

$status =  mkdir("$file_dir", 0700);

if($status < 1){

return "unable to create  diractory $file_dir ";

}

}

if(is_dir($file_dir)){

if($overwrite < 1){

move_uploaded_file($file_tmp_name,"$file_dir/".$file_name);

}

}

//  $file_upload_query="INSERT into user_uploads (`u_id`,`file_name`,`file_type`) VALUES('$user_id','$file_name','$file_size','$file_type'); ";
//mysql_query($file_upload_query);

}

return "Success";

}
In the above code upload_multiple_file is the function which is doing all multiple file upload functionality. The upload_multiple_file function need two parameter. The first one is upload file information, and the second one is the file directory where you need to upload the file. The $overwrite=0; variable is used for checking whether the file having the same name need to be overwrite or not. If you want to overwrite the file make $overwrite to 1. $overwrite=1; The $allowed_file_type array is having the list of allowed file types. If you want to remove or add any file type you can change the $allowed_file_type array accordingly. The $max_file_size_check=1 is for file size checking. If $max_file_size_check=1; the function will check the upload file size. If $max_file_size_check=0; the function will slip the file size check. The $max_file_size = 2097152; is the maximum allowed size of the upload file. In this I also added a mysql insert query $file_upload_query this query will help you to insert the uploaded file information to database. If you want to use the database insert functionality you can uncomment those lines. If you want to store the uploaded file information in database you need to create a database table. You can create sql table by using sql query below. Sql part .

CREATE
TABLE `test`.`user_uploads` (
`id` INT( 11 ) NOT NULL ,
`u_id` INT( 11 ) NOT NULL ,
`file_name` VARCHAR( 255 ) NOT NULL ,
`file_type` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM ;
[highlight textcolor="#00aae8" bgcolor="#fff"]The usage of the function[/highlight] is below.

if
(isset($_FILES['files'])){

$res =  upload_multiple_file($_FILES['files'],"user_files");
echo $res;

}
So let us put all code together, so that it will easy to understand multiple file upload php script tutorial.

<?php

if(isset($_FILES['files'])){
$res =  upload_multiple_file($_FILES['files'],"user_files");
echo $res;
}

function upload_multiple_file($file,$file_dir="user_files") {

$overwrite=0;
$allowed_file_type= array("pdf","ppt","pptx","xls"."xlxs","doc","docx","jpg", "jpeg", "png", "gif");
$max_file_size = 2097152;

foreach($_FILES['files']['name'] as $fkey=> $fname){

$ext = pathinfo($fname, PATHINFO_EXTENSION);
if (!in_array($ext, $allowed_file_type)) {

return "unsupported file format";
break;
}

}

foreach($_FILES['files']['tmp_name'] as $key => $tmp_name ){

$file_name = $_FILES['files']['name'][$key];

$file_size =$_FILES['files']['size'][$key];

$file_tmp_name =$_FILES['files']['tmp_name'][$key];

$file_type=$_FILES['files']['type'][$key];

if($max_file_size_check >0) {
if($file_size > $max_file_size){

$fsize=$max_file_size/1048576;
return    'File size must be less than '.$fsize.' MB';
break;

}
}

if(is_dir($file_dir)==false){

$status =  mkdir("$file_dir", 0700);

if($status < 1){

return "unable to create  diractory $file_dir ";

}

}

if(is_dir($file_dir)){

if($overwrite < 1){

move_uploaded_file($file_tmp_name,"$file_dir/".$file_name);

}

}

//  $file_upload_query="INSERT into user_uploads (`u_id`,`file_name`,`file_type`) VALUES('$user_id','$file_name','$file_size','$file_type'); ";
//mysql_query($file_upload_query);

}

return "Success";

}

?>

<form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="files[]" multiple/>
<input type="submit" value="submit"/>
</form>
Download Here

Tuesday 12 August 2014

Indian states list in php array format

I listed the Indian country states in PHP array format. The array contains two digit state code and state name. India has 28 states and seven Union territory, so totally 35 states are listed in the array. I hope it will help someone.



28 Indian States list



$indian_states = array (
 'AP' => 'Andhra Pradesh',
 'AR' => 'Arunachal Pradesh',
 'AS' => 'Assam',
 'BR' => 'Bihar',
 'CT' => 'Chhattisgarh',
 'GA' => 'Goa',
 'GJ' => 'Gujarat',
 'HR' => 'Haryana',
 'HP' => 'Himachal Pradesh',
 'JK' => 'Jammu & Kashmir',
 'JH' => 'Jharkhand',
 'KA' => 'Karnataka',
 'KL' => 'Kerala',
 'MP' => 'Madhya Pradesh',
 'MH' => 'Maharashtra',
 'MN' => 'Manipur',
 'ML' => 'Meghalaya',
 'MZ' => 'Mizoram',
 'NL' => 'Nagaland',
 'OR' => 'Odisha',
 'PB' => 'Punjab',
 'RJ' => 'Rajasthan',
 'SK' => 'Sikkim',
 'TN' => 'Tamil Nadu',
 'TR' => 'Tripura',
 'UK' => 'Uttarakhand',
 'UP' => 'Uttar Pradesh',
 'WB' => 'West Bengal',
);


7 Union Territory



$indian_union_territory  = array (
 'AN' => 'Andaman & Nicobar',
 'CH' => 'Chandigarh',
 'DN' => 'Dadra and Nagar Haveli',
 'DD' => 'Daman & Diu',
 'DL' => 'Delhi',
 'LD' => 'Lakshadweep',
 'PY' => 'Puducherry',
);


All Indian States list



$indian_all_states  = array (
 'AP' => 'Andhra Pradesh',
 'AR' => 'Arunachal Pradesh',
 'AS' => 'Assam',
 'BR' => 'Bihar',
 'CT' => 'Chhattisgarh',
 'GA' => 'Goa',
 'GJ' => 'Gujarat',
 'HR' => 'Haryana',
 'HP' => 'Himachal Pradesh',
 'JK' => 'Jammu & Kashmir',
 'JH' => 'Jharkhand',
 'KA' => 'Karnataka',
 'KL' => 'Kerala',
 'MP' => 'Madhya Pradesh',
 'MH' => 'Maharashtra',
 'MN' => 'Manipur',
 'ML' => 'Meghalaya',
 'MZ' => 'Mizoram',
 'NL' => 'Nagaland',
 'OR' => 'Odisha',
 'PB' => 'Punjab',
 'RJ' => 'Rajasthan',
 'SK' => 'Sikkim',
 'TN' => 'Tamil Nadu',
 'TR' => 'Tripura',
 'UK' => 'Uttarakhand',
 'UP' => 'Uttar Pradesh',
 'WB' => 'West Bengal',
 'AN' => 'Andaman & Nicobar',
 'CH' => 'Chandigarh',
 'DN' => 'Dadra and Nagar Haveli',
 'DD' => 'Daman & Diu',
 'DL' => 'Delhi',
 'LD' => 'Lakshadweep',
 'PY' => 'Puducherry',
);

Saturday 14 June 2014

jQuery Change Opacity of Image on Mouseover

Here I will explain how to use jQuery to change image opacity on mouseover using jQuery or change opacity of image on hover using jQuery.


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery Change Image Opacity on Mouse Over</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function() {
$("#logoimage").css("opacity", 0.5);
$("#logoimage").hover(function() {
$(this).animate({ opacity: 1.0 }, 500);
}, function() {
$(this).animate({ opacity: 0.5 }, 500);
});
})
</script>
</head>
<body>
<form id="form1">
<div>
<img id="logoimage" src="FinalLogo.png" />
</div>
</form>
</body>
</html>


jQuery Change Opacity of Image on Mouseover

Tuesday 3 June 2014

Full width image slider for your homepage

In this tutorial i want to show you how easily you can change the way of how homeslider appears in default-bootstrap template in PrestaShop 1.6. As you know default homeslider module is a part of homepage of your shop. It appears right below the main menu. Near the module (on right hand side) you can see two small banners. In this guide i will show you how to remove these banners, and how to change width of slider to 100%.


full-width-slider


Disable to small banners on the right hand side


First step in our modificaiton: we have to remove two small banners on the right hand side of the main slider. These images are a part of “theme configurator” module and to remove these banners we just have to disable this module. But be aware, don’t disable module at all, just disable it in hook named displayTopColumn. In this case go to modules > positions tab in back office. Search there for modules list named displayTopColumn. You will see there two modules (by default there are two modules). Click on edit button near theme configurator and click on “unhook”, exactly as i show on image below.


Unhooking theme configurator module from displayTopColumn position


1-unhook-theme-configurator-from-theme-configurator


After this action two small baners will disappear but they will left blank empty space. So we have to fill this blank space with our slider module. Then it will have full width :)


Change width of the banner


Go to modules > modules tab and search for “image slider for your homepage” addon. Click on configure button near this module and then – you will be redirected to module configuration page. In the main “settings” form change Max width param value from 799px to 1170px (just type 1170 in this field exactly as i show below). Wondering why 1170? 1170 is a width of the main page container.


changing width of the default home slider module from 799 to 1170


2a-image-slider-full-width-prestashop-1-6


Removing banners with width smaller than 1170


Due to the fact that we changed width of the slider window, we have to remove old smaller than 1170px (width) pictures that we uploaded. We have to upload pictures with min-width: 1170px; On screenshot below i show how to remove actual slides. Below the “settings” form (where you changed width of slider) you can manage already uploaded slides. Just hit on delete button like i show:


removing default slides with old small width value (799)


2b-remove-slides-imageslider


Upload images with new sizes


If you removed all old slides with wrong width – now it’s time to upload new pictures. So, you have to prepare own slides for example in photoshop or other desktop software. Create slides with width at least 1170 and upload them to slider. They will appear as a “full” width slides, like i show on effect image at the bottom of this article. After upload new slides – don’t forget to Enable them :)


New slide uploaded to website


2c-upload-new-images-correct-size


effect of our modifications: full width slider in prestashop 1.6


0-slider-full-width-prestashop-1-6


 


 



Full width image slider for your homepage

Thursday 8 May 2014

Disabling Right Mouse Click Using jQuery

If you are to disable right click on your web browser, you can use the following piece of code:



$(document).ready(function(){
$(document).bind("contextmenu",function(e){
return false;
});
});

Determine Browser


Suppose you were to determine the browser type of the browser currently in use. You can use the following piece of code to do this:


$(document).ready(function() {
// If the browser type if Mozilla Firefox
if ($.browser.mozilla && $.browser.version >= "1.8" ){
// some code
}
// If the browser type is Opera
if( $.browser.opera)
{
// some code
}
// If the web browser type is Safari
if( $.browser.safari )
{
// some code
}
// If the web browser type is Chrome
if( $.browser.chrome)
{
// some code
}
// If the web browser type is Internet Explorer
if ($.browser.msie && $.browser.version 6)
{
// some code
}
});


Disabling Right Mouse Click Using jQuery

Tuesday 15 April 2014

save images into database using base64encoding

In this tutorial tip let us check how can we save images into database using base64encoding. Usually we will upload an image into the server and keep the image file name into the database, and use that image file name if we want to use that image right?. Yea but here what I’m going to show is how can we save the image itself into the database.


For that Let us create a database table.



CREATE TABLE `test`.`user_pic` (
`id`
INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`img` LONGTEXT NOT NULL ,
`type` VARCHAR( 10 ) NOT NULL
) ENGINE = MYISAM ;

So we are using this table for saving the image.

the next part is the image upload part.



<?php



$hostname = 'localhost';


$dbname = 'test';


$db_user = 'root';


$db_password = '';


$link = mysql_connect($hostname,$db_user,$db_password);


$connect = mysql_select_db($dbname,$link)or die(mysql_error());



if(isset($_FILES['file'])){



    $allowed_file_type = array("jpg", "jpeg", "png", "gif");


    $max_file_size = 524288;



   $file_dir="uploads";



    $file_name = $_FILES['file']['name'];



    $file_size =$_FILES['file']['size'];



    $file_tmp_name =$_FILES['file']['tmp_name'];



    $file_type=$_FILES['file']['type'];



    $ext = pathinfo($file_name, PATHINFO_EXTENSION);



    if (in_array($ext, $allowed_file_type)) {



          if($file_size > $max_file_size){



                $fsize=$max_file_size/1048576;


                echo 'File size must be less than '.$fsize.' MB';


                break;



            }



            $str = file_get_contents($file_tmp_name);


            $b64img=base64_encode($str);


            $sql="INSERT INTO `user_pic` (`img` ,`type`)VALUES ('$b64img', '$ext')";


            mysql_query($sql);



    }


}


?>


<form action="" enctype="multipart/form-data" method="POST">Choose a file to upload : <input type="file" multiple="multiple" name="file" />


 <input type="submit" /></form>



So by using this code you can easly upload an image into the database.





$str = file_get_contents($file_tmp_name);

$b64img=base64_encode($str);




This code is doing the image encoding part. This line of code first read image file then convert it into base64_encode.

If you don’t want to encode it to base64_encode you can remove this line of code.


if you want to get the image from database use this code.




$hostname = 'localhost';


$dbname = 'test';


$db_user = 'root';


$db_password = '';


$link = mysql_connect($hostname,$db_user,$db_password);


$connect = mysql_select_db($dbname,$link)or die(mysql_error());


$sql="SELECT * FROM `user_pic` WHERE `id`=5";


$res=mysql_query($sql);


$data=mysql_fetch_assoc($res);


$image= $data['img'];


$image_type= $data['type'];


$res=base64_decode($image);


header("Content-type:image/$image_type");



So using this simple technique you can easily save images into database using base64encoding. ;)



save images into database using base64encoding

Monday 24 March 2014

PHP Training in Vadodara

Why PHP ?


php web development due to its increasing advantages, its demand is growing in web development field. It is essential that business developers are aware of PHP development to realize their choices better. Along with Linux and MySQL the technology has appeared as one of the most helpful and free web programming platforms. Whether you need a simple website or a mighty database in the backend, a forum location or a client amicable content administration scheme, PHP offers you everything and that are free, except for charges of PHP developers. If a business unit requests a complete and purposeful website for lesser value then PHP Web development is the eventual choice.


The IT experts at Paceinfonet Web Solution Pvt Ltd have extensive experience and knowledge of LAMP | WAMP technologies and other open source software, and can quickly built web and batch processing applications in the areas of Content Management Systems, e-Commerce, Business Directoies, Forums, Marketing, Sales and Workflow Systems, Transport and many others.


PHP Training in Vadodara


PHP MySql Training in Vadodara


PHP, a opensource powerful tool for making dynamic and interactive Web pages, is the widely-used, free and efficient alternative to competitors such as Microsoft’s ASP .Net


Why PHP Live training at Paceinfonet Web Solution Pvt Ltd – Vadodara ?


The professional PHP training can’t provide by an institute. You can get it by an IT Company only.


Paceinfonet Web Solution Pvt Ltd have many satisfied clients with PHP and MySql web application development. Please check few of our latest websites developed using PHP, MySQL, Prestashop and WordPress.


We have designed special PHP course with practical knowledge of dynamic website creation jobs. Here you will learn about PHP in a very simple way, and how to execute scripts on your server.


PHP & MySQL are two of the most popular open source technologies to emerge during the past decade. PHP is a powerful language for writing server-side Web applications. MySQL is the world’s most popular open source database. Together, these two technologies provide you a powerful platform for building database-driven Web applications.


PHP & MySQL training course in Vadodara by IT Company. Our Expert Developer teach you everything they need to build data-driven Web sites using PHP & MySQL successfully.


WordPress Training in Vadodara


WordPress is web software you can use to create a beautiful website. It’s both free and priceless at the same time.


Ecommerce (Prestashop) Training in Vadodara


Prestashop is web software you can use to create a beautiful Ecommerce website. It’s both free and priceless at the same time. Ecommerce website is most demanded in current time. e.g flipkart.


 For Further Information Please email us on vadodara@paceinfonet.com Or call us on 0265 3006513



PHP Training in Vadodara

Final Year Project training in vadodara

“Paceinfonet Web Solution Pvt Ltd” is pioneer in providing the Software Training,Corporate Training,Web Development,Web Based Softwares and Web Hosting.


The ” Paceinfonet Web Solution Pvt Ltd ” is an acknowledged leader in providing high quality and affordable IT training for companies and individuals in the field, Our accomplished team has expert knowledge and a vast experience of the IT industry; so we can assist you to make the correct decision about the course you need to improve your career choices.

We Share a podium to the students to work with professionals on our Live Projects.


“Paceinfonet Web Solution Pvt Ltd” Announce Complete Final Year Training for Final Semester BCA / MCA/ M.sc/BE IT students, We train exclusively PHP & MySQL, Joomla, Ecommerce & WordPress in our Lab. We gives you Opportunity to work on LIVE Project for Complete Industrial Experience. “We’re recruiting programmers in Our Development Team out of best trainees .” In short Best candidates can have opportunity to get their First Job in our Company while your training.


Final Year Project training


For Further Information Please email us on vadodara@paceinfonet.com Or call us on 0265 3006513



Final Year Project training in vadodara

Only Display Certain Categories in a Menu

In many cases, users only want to display certain categories in their navigation menu at the top of the page. There are limited spots, that can only be filled by top categories, but if you use the default wp_list_categories code, it will show all categories. This is why this hack below comes in very handy when you want to create a navigation menu and only display certain categories.


Only Display Certain Categories in a Menu


 


<ul style="float:left; width:730px;">
<?php wp_list_categories('orderby=name&include=7,9,19,16,1,5,17,23'); ?>
</ul>

Note, you can also change the ‘include’ text to ‘exclude’ and show all categories and exclude those that you don’t want displayed. The numbers displayed in the code are the category IDs.

Remember since WordPress shows categories in a list format, you will need to edit the CSS in order to make it work.



Only Display Certain Categories in a Menu

Friday 14 March 2014

Convert a Menu to a Dropdown

How To convert any menu into drop down ? Are You Confuse …..? We see here example how we convert menu to dropdown

We’ll create a dynamic menu that converts to a dropdown when viewed on a small screen.


In below screen you just see normal menu.


simplemenu


If your see it on 960px on your screen resolution you can see.


dropdownmenu


dropdownmenu1


 


Here we attached sample code that how it was work….Also if you understand that code you know how responsive site work


Download Sample Code


Thank You……… ;)



Convert a Menu to a Dropdown

jQuery Map Marker Plugin

jQuery Map Marker Plugin makes it easy to put multiple markers on Map using Google Map API V3.

Map Marker is very useful when you have a list of data & you want to show all of them on Map too.


Like most of the jQuery plugins, this plugin is very straight forward to setup.

It has some nice options & uses JSON formatted data for every Locations.


Also make note that you must have to pass the Location values using Lattitude & Longitude co-ordinates of the that Location (due to Google map API limitation).


mapmarker-e1375162824274


Below steps will make more sense of using this plugin.


Step-1 : Include necessary JS files in your <head> tag


<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script><script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>

<script type="text/javascript" src="js/mapmarker.jquery.js"></script>

Step-2 : Create a Map container using divtag & give it an ID in your html body


<div id="map" style="width: 550px; height: 450px; border: 2px solid red;"></div>

Step-3 : Apply the Plugin to the Map element using below code. Put the code before closing </head>tag



<script type="text/javascript">// <![CDATA[
$(document).ready(function(){

//set up markers
var myMarkers = {"markers": [
{"latitude": "31.42866311735861", "longitude":"-98.61328125", "icon": "img/house.png", "baloon_text": 'This is <strong>Texas</strong>'},
{"latitude": "35.101934057246055", "longitude":"-96.6796875", "icon": "img/castle.png", "baloon_text": 'This is <strong>Oklahoma</strong>'},
{"latitude": "38.61687046392973", "longitude":"-98.876953125", "icon": "img/house.png", "baloon_text": 'This is <strong>Kansas</strong>'}
]
};

//set up map options
$("#map").mapmarker({
zoom : 5,
center : 'United States',
markers : myMarkers
});

});
// ]]></script>

 Each locations will include 4 entities.

1. latitude – latitude of the location

2. longitude – longitude of the location

3. icon – a custom icon to display on map as marker (16 x 16 pixels size)

4. baloon_text – a Text to display in a Baloon on map when clicked on that specific Marker. You can also use this text in HTML format. Make sure you use single quotes(‘) only for HTML format baloon text.


Use below link if you want to get latitude & longitude
http://www.findlatitudeandlongitude.com/find-address-from-latitude-and-longitude.php


Additionally, there are 2 more options which you can set on Map.

1. zoom – to set default zoom level of the Map. Increase the value to zoom-in & Decrease the value to zoom-out

2. center – to specify the center location of the Map. Make sure the center location address you enter is spelled properly.

3. markers – this will be simply the Markers variable we created, here it is “myMarkers”


Step-4 : That’s All


Enjoy………………!!


Demo and Download code go to below site


http://www.welancers.com/jquery-map-marker-plugin/



jQuery Map Marker Plugin

Saturday 22 February 2014

Best IT Comapny in Vadodara

Pace Infonet Web Solutions Pvt. Ltd. is a brand in premium IT solutions in All over the World. Pace Infonet Web Solutions Pvt. Ltd. is a leading IT Company in Vadodara.


provider with its leading presence in verticals like IT Training, Web Development & Web Hosting. The company was started in year 2007 with a vision to provide premium high quality services and since then it has succeeded to do so with 1000′s of satisfied clients and end-users.


 


With the vast industry experience gained over the years, the company has diversified and not only accumulated it but also distributed its skills & knowledge in form its IT Training vertical. The company always looks forward to contribute to the growth of the industry by offering high quality products as well as skilled workforce.


 



  • Web Designing

  • Web Development

  • Web Hosting

  • Domain Names

  • Ecommerce Development

  • Web Maintenance

  • Mobile Development

  • Outsourcing

  • SEO

  • PHP Training

  • ASP.Net Training

  • Last Sem Project Guidance (BCA, MCA, B.E, Msc. IT)



Best IT Comapny in Vadodara

Tuesday 18 February 2014

dot net and asp dotnet interview questions

Welcome to .Net  Interview Questions area. These questions are designed to provide a better understanding of Microsoft technologies such as .Net environment, .Net Framework , vb.net , c# , asp.net , sql server etc. Take time to review the common interview questions you will most likely to be asked. These Questions will often link to more detailed information.


 


 .Net Environment – Interview Questions



  • Difference between a Debug and Release build

  • Difference between normal DLL and .Net DLL

  • What is an Interface

  • Difference between Abstract Class and Interface

  • Difference between a thread and a process

  • What is .Net Delegates

  • Differences between a control and a component

  • Differences between Stack and Heap

  • What is .Net Reflection

  • Globalization and Localization

  • What is .Net serialization

  • Difference between web service and .net remoting

  • Difference between managed and unmanaged code

  • Difference between Shallow copy and Deep copy

  • Use of System.Environment Class


 


ADO.Net – Interview Questions



  • What are the advantage of ADO.Net

  • Differences between classic ADO and ADO.NET

  • What are managed providers

  • difference between Dataset and DataReader

  • How to ADO.Net Connection Pooling

  • How to Transaction in ADO.NET

  • What is ADO.Net Locking

  • Difference between SqlCommand and SqlCommandBuilder

  • Difference between Typed DataSets and UnTyped DataSets


 


.Net Framework – Interview Questions



  • Difference between NameSpace and Assembly

  • Execution process for managed code

  • What is an Asssembly Qualified Name

  • How to Assembly versioning

  • Add and remove an assembly from GAC

  • What is Native Image Generator (Ngen.exe)?

  • How to force Garbage Collection

  • Difference between CType and DirectCast

  • Obsolete or Deprecated in NET Framework

  • What is lazy initialization

  • Difference between Clone and Copy

  • Difference between Finalize() and Dispose()

  • Difference between static and constant


 


 .Net General – Interview Questions



  • Difference between a Value Type and a Reference Type

  • System level Exceptions Vs Application level Exceptions

  • Difference between sub-procedure and function

  • What does the term immutable mean

  • What does the keyword static mean

  • this.close() Vs Application.Exit()

  • Difference between a.Equals(b) and a == b

  • Difference between Hashtable and Dictionary

  • Difference between Exception and Error

  • C# Dictionary Versus List Lookup Time

  • Difference between the Class and Interface in C#


 


Asp.Net – Interview Questions



  • What is IIS – Internet Information Server

  • What is Virtual Directory

  • What is HttpHandler

  • Page Directives in Asp.Net

  • What is a postback

  • What is IsPostBack

  • What is global.asax

  • Difference between Machine.config and web.config

  • Difference between HTML control and Web Server control

  • What is Query String

  • Difference between Authentication and Authorization

  • How to secure Connection Strings

  • What is ASP.Net tracing

  • Passing values between Asp.Net pages

  • Differentiate between client side validation and server side validation



dot net and asp dotnet interview questions

Friday 14 February 2014

Best Web Hosting Service in India

In web hosting industry, India is a vast market. So that we see many popular hosting companies set branches and support centers in this stream. With it’s powerful IT technologies, India also manages the second largest internet user country in the world. If you are an Indian customer and planning to host your business site on Indian hosting server but not sure which service to go, we’ll provide some guidance on how to choose the right Hosting service provider.


How to find the best web hosting Service in India or USA?


Best hosting services has become major important aspect these days to bring your business website online or world wide web and make visible to everyone globally. Suppose if you go to Google and you search for the best hosting services in India, plenty of hosting websites will be displayed and therefor you are sure which one to Hire.


web_hosting_services_indiaWeb-hosting-domain-services


All web hosting companies in India or USA offers a hosting server where you can store your business sites and create them available on the internet. Some do it better than others. The best and top providers give quality Hosting services great assistance and offer a variety of functions. However some are not.


An industry of web hosting market sometimes encourages for free services. Keep in mind the fact that you only get what you pay for. And there no folks provide you good services for FREE. Also, you should keep in mind that Pay the very lowest and what would you get? Off course very lowest in features, support, services and assistance.


Do Check if the Hosting Website go slow/Offline Often


Keep in mind that your web host should provide 99.9 % Server Up time  Because, it may be possible that you may loose all traffic If your business web site go offline. Hence, you should make sure that your web Host should have 99.9% Server Up time.


When you are in search of a Best hosting services in India take some time to analysis the newest specialized improvements and see what the best serves are providing. The best are not actually expensive; actually they are competitive for your hosting consideration.


There are lot of web hosting sites provide free web host but of course the advantages are restricted. There are a lot of sites that provide best hosting service at a little cost and come with more advantages. This would be more better than the previous one.


About Paceinfonet Web Solution Pvt Ltd

We are a fast growing Web Development & Web Hosting company in India working in the industry since last 7 years. We have very high project completion rate and have executed websites which stand out and give our clients a competitive edge. With hundreds of eye-catching websites under our belt. We specialize in E-commerce & Custom websites, Joomla, WordPress, any and all PHP based Opensource platforms.


Please check our Web hosting and development services at -


www.paceinfonet.org
www.paceinfonetwebdesigningstudio.com
www.paceinfonet.com


You can get More information about Hosting and Domain @ http://www.paceinfonet.com



Best Web Hosting Service in India

Saturday 25 January 2014

rich password widget for your web forms

Here is a password field widget that not only has a password strength meter but also has other essential features that your users would love to have.


password-widget-1


Mask or unmask? Do passwords really have to look like **** ?


When you type-in your password, the password field shows a mask. This mask supposedly prevents someone from observing your screen ‘over the shoulder’ .


password-widget-2Need a strong password quickly? Generate it.


For those users, it will just be good to generate a password for the web site and then let the password manager remember it for life. Having a password generator along with the password field will be handy.


Download


PasswordWidget


Usage

The usage is simple.

First, link to the style sheet and the JavaScript file:



<link rel="STYLESHEET" type="text/css" href="pwdwidget.css" />
<script src="pwdwidget.js" type="text/javascript"></script>

Instead of the password field, use the code below.



<label for='regpwd'>Password:</label> <br />
<div class='pwdwidgetdiv' id='thepwddiv'></div>
<script  type="text/javascript" >
var pwdwidget = new PasswordWidget('thepwddiv','regpwd');
pwdwidget.MakePWDWidget();
</script>
<noscript>
<div><input type='password' id='regpwd' name='regpwd' /></div>
</noscript>

Notice that noscript part makes sure that a normal password field is shown even if Java Script is disabled.


The parameters to the PasswordWidget() class are: (1)the ID of the div for the widget and (2)the name of the password field.



var pwdwidget = new PasswordWidget(id_of_div,name_of_passwordfield);

More options


The features can be turned on/off. For example, it doesn’t make sense to have a ‘generate’ option in a log-in form. Here is the code:


var pwdwidget = new PasswordWidget('thepwddiv','regpwd');
pwdwidget.enableGenerate=false;
pwdwidget.enableShowStrength=false;
pwdwidget.MakePWDWidget();

Similarly, you can modify/translate the label text :


var pwdwidget = new PasswordWidget('thepwddiv','regpwd');
pwdwidget.txtShow= 'Display';
pwdwidget.txtMask= 'Hide';
pwdwidget.MakePWDWidget();


rich password widget for your web forms