• Home
  • Trace mobile number (From India)
  • Entertainment
  • SiteMap
  • Home
  • ASP.NET
  • C#
  • BLOGGING
  • SQL SERVER
  • FACEBOOK
  • Entertainment
Here is list of oops interview questions and answers for freshers and experienced from basic to advance Object Oriented Programming questions with examples . Net Interview Questions and Answers | OOPs Interview Questions with Answers PDF | OOPs Interview Questions in C++ c# .

Frequently asked .Net Interview Questions and Answers on Object Oriented Programming (OOPS) .NET Interview Questions and answers on OOPS.Here is List of questions.Frequently Asked Questions with answers.


  1. What is Abstract method?
  2. What is Polymorphisms?
  3. What is Virtual method?
  4. Can Struct be inherited?
  5. What is Object?
  6. What is Class?
  7. What is Static field?
  8. What is Static Method?
  9. What is Inheritance?
  10. What is Virtual keyword?
  11. What is New modifiers?
  12. What is Abstract Class?
  13. What is Sealed modifiers?
  14. What is an Interface?
  15. When to use Interface over abstract class?
  16. What is pure virtual function?
  17. Can we specify the access modifier for explicitly implemented interface method?
  18. What is Protected access modifier in C#?
  19. What is Public access modifier in C#?
  20. What is Private access modifier in C#?
  21. What is Internal access modifier in C#?
  22. What is Protected Internal access modifier in C#?
  23. What is method overloading?
  24. What is Overriding?
  25. What is Method overloading?
  26. What is Method Overriding? How to override a function in C#?
  27. Can we call a base class method without creating instance?
  28. In which cases you use override and new base?
  29. Difference between new and override keyword?
  30. What is a private constructor? Where will you use it?
  31. Can we declare private class in a Namespace?
  32. What is Polymorphism?
  33. What Are Attributes in DotNet?

  34. What can you do to make class available for inheritance but you need to prevent it's method to come in inheritance chain?
  35. What's the Difference between Interface and Abstract Class
  36. What are the various types of Constructors
  37. What are Constructors ?
  38. When to Use Abstract Classes and When Interfaces.
  39. Diversities between an abstract method & virtual method ?
  40. What is Early binding and late binding?
  41. How's method overriding different from overloading?
  42. What does the keyword virtual mean in the method definition?
  43. Can you declare the override method static while the original method is non-static?
  44. Can you override private virtual methods?
  45. Can you prevent your class from being inherited and becoming a base class for some other classes?
  46. Can you allow class to be inherited, but prevent the method from being over-ridden?
  47. Why can't you specify the accessibility modifier for methods inside the interface?
  48. Static datamembers should be initialized inside the constructor. True or False.
  49. Static methods can not use non static members. True or False.
  50. A constructor can be private. True or False?
  51. What is the work of a constructor?
  52. Name the operators that cannot be overloaded.
  53. What is "this" pointer?
  54. Difference between sealed and static classes.
  55. Differences between a structure and class.
  56. What are the different ways a method can be overloaded?
  57. Difference between a Class and an object.
  58. Define OOPS. What are its benefits?
  59. Can we have Sealed Method in abstarct class ?
  60. Can we have an Abstract class without having any abstract method ??
  61. Can we have Multiple Main Methods in one .cs file
  62. If the Function has same parameter but different return type (int and float), Is it a overloading?
  63. How does Composition mechanism works ?
  64. What is the advantage of parametric polymorphism ?
  65. What is difference in between abstrct classes and interfaces ?
  66. Overloading is Static Polymorphism and Overriding is Dynamic Polymorphism ? True or False ?
  67. What is the default access modifier of a class?
  68. Can a constructors that is declared within a base class, inherited by subclasses ? Yes or No

Following are the procedure to check databalance left in Mobile or in 2G , 3G E-Stick / Dongle for various Indian operators,this is USSD command can be dialed through mobile phone or direct dongle , some of the dongles are having USSD option in their dashboard/software .

Operator Name Dial to Check Data Balance ( USSD )
Airtel 2G & 3G *123*10#
AIRCEL 2G & 3G *123#
BSNL 2G & 3G *112# – Reply/Send “2″ For GPRS Day
Idea 2g & 3g Check SMS Inbox for balance left – check note
Dial *125#
Reliance GSM SMART 2G & 3G
*333#   Reply 1,3,1 Mobile Broadband Balance or
Dial *367*3# or
Send SMS “MBAL” to 55333 and you will Get a reply (for details check screenshot below)
Tata Docomo 2G & 3G *111*1#
Vodafone 2G & 3G                    *111*6# for Prepaid
For Postpaid Dial *777*7*MDN# 
MDN = 10 Digit Device/Dongle/Mobile No.
Videocon 2G & 3G *123#
How to handle the asp.net dropdownlist selectedindexchanged event in javascript .Here I will explain how to raise dropdownlist selectedindexchanged event in JavaScript using asp.net.Asp.net Dropdownlist Selectedindexchanged Event in JavaScript.

Generally we will use onchange event of Dropdownlist in asp.net  to raise dropdownlist selectedindexchanged event in JavaScript like as shown below


<asp:DropDownList runat="server" ID="ddlID" onchange="JavaScript: onSelectChange ();">
    </asp:DropDownList>

<script>
 function onSelectChange()
 {
 alert("hello !");
 }
</script>

You can also add Javascript function on dropdownlist onchange event from  code behind page file as follows.Just add bellowcode on Page_Load Event of Page.

ddlID.Attributes.Add("onChange", "return onSelectChange ();");

Error Message:
Msg 8152, Level 16, State 14, Line 2
String or binary data would be truncated.
The statement has been terminated.


Some time this error is occurred when we insert data into database.Check the Database Column Size and Data length. you will get this error when you are storing data of length greater than that of defined size.

Example:-


string MyData = "Error Message: String or binary data would be truncated. The statement has been terminated.";
    int Mydatalength = MyData.Length;  // will be more than 30 characters , greater than defined size
    Customer.Name = MyData;
    //you will get error for this line.

Because you have Name (varchar 25, null) in Database if you want to solve this error just increase the size of name column in database.


Sql Query Example:-


DECLARE @EmpDetails TABLE(EmpId INT, Name VARCHAR(25),Designation VARCHAR(10))

INSERT INTO @EmpDetails(EmpId,Name,Designation)
VALUES(1,'Rajesh','Error Message: String or binary data would be truncated. The statement has been terminated.')

SELECT * FROM @EmpDetails



If you watch  above query here Designation field is declare with VARCHAR(10) and we trying to  inserting more than 10 characters because of that you got error like .


Msg 8152, Level 16, State 14, Line 2
String or binary data would be truncated.
The statement has been terminated.

To solve this problem just changed the size of Designation column  to datatype 
 VARCHAR(10) to VARCHAR(500) and run the below query.
DECLARE @EmpDetails TABLE(EmpId INT, Name VARCHAR(25),Designation 
VARCHAR(500))

INSERT INTO @EmpDetails(EmpId,Name,Designation)
VALUES(1,'Rajesh','Error Message: String or binary data would be truncated. The statement has been terminated.')

SELECT * FROM @EmpDetails


Now you will see the query is running without any error.

The Javascript substring() method extracts the characters from a string, between two specified Charecter positions in string, and returns the new sub string.Javascript String - substring() Method : Learning Javascript in simple and easy steps. A beginner's tutorial containing complete knowledge of Javascript Syntax .

Javascript substring()  syntax : 

String.substring( from [, to ] )

This Javascript substring() method extracts the characters from a string between "from" and "to ", not including "to" itself.

Some Notes about Javascript  Substring() Method:

If 'from' equals 'to', it returns an empty string.
If 'to' is omitted, it extracts characters to the end of the string.
If either argument is less than 0 or is NaN, it is treated as if it were 0.
If either argument is greater than string’s length, either argument will use string’s length.
If from >to, then substring will swap those 2 arguments.


Example of Javascript substring() Method :-


<script>

var str="Hello Javascript substring method";
document.write(str.substring(3,3)+"<br />");
document.write(str.substring(3)+"<br />");
document.write(str.substring(3,0)+"<br />");
document.write(str.substring(3,7)+"<br />");
document.write(str.substring(7,3)+"<br />");

</script>

The output of the code above will be:

empty string
lo Javascript substring method
Hel
lo J
lo J


Top 10 Javascript Article


No. Title Read
1 Javascript Example-Validate email address in Javascript-Regex Read
2 javascript validation to a textfield to check for null. Read
3 Javascript Code: Live Clock on webpage Read
4 Javascript Code:Add a Print button for page Read
5 Javascript Code: Back and forward button Read
6 Change the Background color of the page Read
7 Javascript Code: Indentify your browser Read
8 Javascript Code: Close the browser Window on button click Read
9 Don't let the user use right click on mouse |Disable mouse right click Javascript code Read
10 How to display a message box when page opens Read


Email Validation: Cross browser Email Validation in JS. JavaScript for Email Address Validation with explanation of the code.The script on this page has been updated to deal with cross-browser issues. Learn how to validate a users email address using Javascript.

Using Regular Expressions is probably the best way. Here's is an function Which will return true if Email is a Valid email and false if email is not valid .



<script>
 
  function validateEmail(email) {
    var regstring = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\
".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA
-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return regstring.test(email);
}
 
 
</script>


But keep in mind that one should not rely only upon JavaScript validation. JavaScript can easily be disabled. This should be validated on the server side as well.


Textbox empty check using javascript,empty textbox validation with javascript ,JavaScript tutorial validate form: Textboxes,Client Side Validation using JavaScript for textbox empty check . how to write javascript alert message for empty textbox , javascript validation to a textfield to check for null.

If you have a textbox and you want to check that the box must not be null using javascript. the below javascript code will help you.


JavaScript Example Code


<script>
  function checknull()
  {
    if(document.getElementById("txttext").value=="")
    {
      alert("Please enter value.");
      return false;
    }
  }
</script>


You just call this function on Blur to event to check textbox is empty or having value.
onblur=" checknull() ;" -- add this to text box property Like below

<asp:TextBox ID="txttext" runat="server" Text="" onblur=" checknull();"></asp:TextBox>

All The Best !!!



If you have  textbox in a form,when a user submits the form,it should check whether the user has filled it or not .The below javascript code will check whether a use filled the text box or left it the default value.this query will validate textbox. 

I am trying to validate a text box so that if the default value for the text box or a blank value is provided, it prevents the form from being submitted.


Javascript code is as follows


  <script  >
   function checkForm()
    {
  
    if (form1.elements['txttext'].value == "" || form1.elements['txttext'].value == "Default Value")
    {
        alert("Please Enter the value in textbox");
        form1.elements['txttext'].focus();
        return false;
    }
      else
       {
        form1.submit();
        return true;
       }
       return true;
}

</script>

 Aspx page code is as follows

<asp:TextBox ID="txttext" runat="server" Text="Default Value"></asp:TextBox>
    <asp:Button ID="btnsubmit" runat="server" Text="submit" OnClientClick="return checkForm()" />


Microsoft Office includes the ability to recover both an unsaved workbook that's newly created as well as the most recent previous version of an Excel workbook.Here in this tutorial you will learn how to recover Unsaved Excel File.After reading this article you can Recover an Unsaved Excel File.

Recover an Unsaved, New File


To  Recover an Unsaved, New File Follow the below steps.


1- Open Excel and select the "File" menu.

2- Now Choose "Recent Document" and then "Recover Unsaved Workbooks." The saved drafts folder opens on your desktop.
3-Select the file you were working on and forgot to save. Select "File," and then "Save As."

Recover an Unsaved, Existing File


To  Recover an Unsaved, Existing File Follow the below steps.


1-Open Excel and select the workbook in which you were working.


2-Select "File," and then select  "Info."


3-From the list of versions, click the one labeled "when I closed without saving."


4-Click "Restore" . This selection overwrites the previous version of the workbook to the last version autosaved.




 Video Tutorial-

 
Newer Posts Older Posts Home

Most Read

  • How to Capitalize the First Letter of All Words in a string in C# ?
  • keyboard shortcuts For Windows
  • List Of Best Free WordPress Plugins : 2012
  • Read Write XML Data-Read Write XML File Using C#, VB.NET In Asp.Net
  • How to Shake Internet Explorer - Javascript Code
  • How to Choose a Nice Topic for your Blog .
  • Free Search Engine Submission List ,search engine optimization
  • Number validation in Textbox of ASP.NET Using Regular Expression validator
  • Javascript:Percentage Gain Javascript Calculator
  • .Net Interview Questions and Answers on OOPS | OOPS Frequently Asked Questions
Google
Custom Search Bloggers - Meet Millions of Bloggers

Join Us On FaceBook

  • Recent Posts
  • Comments

All Topics

  • ►  2014 (10)
    • ►  January (10)
  • ►  2013 (14)
    • ►  October (1)
    • ►  April (2)
    • ►  March (11)
  • ▼  2012 (142)
    • ►  December (25)
    • ►  October (1)
    • ▼  September (9)
      • .Net Interview Questions and Answers on OOPS | OOP...
      • How to check 2g 3g internet data balance left in M...
      • asp.net dropdownlist selectedindexchanged event in...
      • Error Message: String or binary data would be trun...
      • JavaScript substring() Method-Javascript Example s...
      • Javascript Example-Validate email address in Javas...
      • javascript validation to a textfield to check for ...
      • Javascript Example-function to validate textbox on...
      • Recover an Unsaved Excel File-XLS File
    • ►  August (2)
    • ►  July (7)
    • ►  June (2)
    • ►  April (5)
    • ►  March (27)
    • ►  February (27)
    • ►  January (37)
  • ►  2011 (23)
    • ►  December (3)
    • ►  November (6)
    • ►  October (12)
    • ►  September (2)
  • ►  2009 (1)
    • ►  June (1)

Tips & Tricks

  • What is good One Blog and Many Categories, or Many Blogs with One Categories?
  • Adding Twitter tweet button to each Blogger posts.
  • How to Choose a Nice Topic for your Blog .
  • Embedding YouTube Videos ,movie in your blog
  • Facebook iFrame Apps – Getting Rid of Scrollbars
  • Facebook Analytics:How to Set Up Your Website or Blog with Facebook Insights for Domains
  • How To Add Perfect Share Box to Blogger
  • Blogger Free Images Hosting Tip,Free unlimited bandwidth image hosting for Blogger blogs
  • Add “Link to this post” codes below Each blogger posts
  • Free Search Engine Submission List ,search engine optimization
  • Adsense Tips for Maximum CTR
  • List Of Best Free WordPress Plugins : 2012
2012 tectopix. All rights reserved.
Designed by tectopix