http://www.imomin.webs.com

Thank You for Visit Me

Md. Mominul Islam

view:  full / summary

Difference between ASP.NET 3.5 and ASP.NET 4.0

Posted by imomins on April 3, 2013 at 3:55 AM Comments comments (0)

ASP.NET 3.5:

1. Whether Client data can be directly accessed ?
In ASP.NET 3.5, the data from the client side cannot be directly accessed. The client side data can only be accessed using script manager’s Page methods,
interface named ICallbackEventHandler or by using the component XMLHttpHandler.

2. Whether we can set MetaTags (Keywords,Description) in the Page Directive?
In ASP.NET 3.5, two meta tags can be used, one with name as keywords and other with name as description to record the keywords and description for SEO purpose.

<meta name="keywords" content="These, are, my, keywords" /> 
<meta name="description" content="This is the description of my page" /> 

3.Whether ViewState can be applied at the Control level ?
ASP.NET 3.5 EnableViewState property cannot be used to apply ViewState at the Control level.It is mainly used at the page level.Its default value is True and its acceptable values ae True and False.

4. How ASP.NET 3.5 identifies ClientID ?
In ASP.NET 3.5, ClientId property has to be used to find the dynamically generated client id.

5.Whether permanent redirection is possible or not ?
There is no RedirectPermanent() method available in ASP.NET 3.5.
Redirect method is less useful than the RedirectPermanent method. It will cause search engine results to be less current, and this can also impact performance because visitors will not be accessing the best URL. Redirect may be most useful for login pages or more complex situations. 

6. Output Caching Enhancement:
OutPut Cache in ASP.Net 3.5 has a limitation - generated content always has to be stored in memory, and on servers that are experiencing heavy traffic, the memory consumed by output caching can compete with memory demands from other portions of a Web application. 

7. QueryExtender Control for filtering the data returned by EntityDataSource and LinqDataSource controls:
There is no QueryExtender control available in ASP.NET 3.5 to filter the data returned by DataSource Controls( EntityDataSource and LinqDataSource).It has to explicitly use 'Where clause' in the data source.

ASP.NET 4.0:

1.Whether Client data can be directly accessed ?
In ASP.NET 4, the data from the client side can be directly accessed using client data view and client data context objects.

Following methods are available in ASP.NET 4.0 to access Client data directly,
1) Client data controls
2) Client templates
3) Client data context 

2. Whether we can set MetaTags (Keywords,Description) in the Page Directive?
The meta keywords and meta
description is really useful for SEO
optimization of the web page. In
ASP.NET 4, the keywords and
description can be included as part of page directive itself.

< %@ Page Language="C#" CodeFile="Default.aspx.cs" 
Inherits="_Default" 
Keywords="Keyword1,Key2,Key3,etc" 
Description="description" %>

3.Whether ViewState can be applied at the Control level ?
In ASP.NET 4, ViewState mechanism is improved to set ViewState at the Contol level besides at the page level set by EnableViewState property in ASP.NET 3.5 .Its default value is Inherit and acceptable values are Enabled,Disabled and Inherit.

4. How ASP.NET 4.0 identifies ClientID ?
In ASP.NET 4, a property called
ClientIDMode is newly introduced to identify and record the ClientId easily.

ClientIDMode has following values.
AutoID – Same as ASP.NET 3.5
Static – There won’t be any separate clientid generated at run time
Predictable-These are used particularly in datacontrols. Format is like clientIDrowsuffix with the clientid vlaue
Inherit- This value specifies that a control’s ID generation is the same as its parent.

The default value of ClientIDMode for a page is Predictable. The default value of ClientIDMode for a control is Inherit. Because the default for controls is Inherit, the default generation mode is Predictable.

5. Whether permanent redirection is possible or not ?
ASP.Net 4.0 introduced a new URL redirection method RedirectPermanent() which avoids round trips.

We can implement this as shown below:

RedirectPermanent("/newpath/newpage.aspx");

RedirectPermanent returns a 301 HTTP response—it redirects permanently to another location. Search engines such as Google and Bing will change their indexes to point to the new page directly. To call RedirectPermanent we will need to get the Response object from the HttpContext.
Then, we can call RedirectPermanent: if you pass false as the second parameter, we can perform further actions and avoid an exception.

6. Output Caching Enhancement:
ASP.NET 4 adds an extensibility point to output caching that enables you to configure one or more custom output-cache providers. Output-cache providers can use any storage mechanism to persist HTML content. This makes it possible to create custom output-cache providers for diverse persistence mechanisms, which can include local or remote disks, cloud storage, and distributed cache engines.

In order to know how to implement Custom Output Caching, please refer to the following URL,

http://www.technologymaterial.com/QAndAD...pe=aspnet4

7. QueryExtender Control for filtering the data returned by EntityDataSource and LinqDataSource controls:
QueryExtender Control is an add-on to the DataSource Controls: EntityDataSource and LinqDataSource. QueryExtender is used to filter the data returned by these controls. As the QueryExtender control relies on LINQ, the filter is applied on the database server before the data is sent to the page, which results in very efficient operations.

i.e., QueryExtender Control is intended to be used to create filters for data that is retrieved from a data source, without using an explicit Where clause in the data source. The control can be used to filter data in the markup of a Web page by using declarative syntax. 

<asp:LinqDataSource ID="dataSource" runat="server" TableName="Products"> 
</asp:LinqDataSource>
<asp:QueryExtender TargetControlID="dataSource" runat="server">
<asp:SearchExpression DataFields="ProductName, Supplier.CompanyName" SearchType="StartsWith">
<asp:ControlParameter ControlID="TextBoxSearch" />
</asp:SearchExpression>
</asp:QueryExtender> 

CSS Interview Questions

Posted by imomins on April 3, 2013 at 3:50 AM Comments comments (0)

1) What are cascading style sheets?
Cascading style sheets help the designer in various ways. It primarily helps to design style sheets for content and HTML pages. It can be applied to any XML document or mark up language.

2) Explain about some of the features of CSS?
Some of the features used by CSS are to define a layout, colors, fonts, etc. It separates the content from the design part which makes the content much more visible thereby improving productivity of the entire process. It can make the same page appear in different formats.

3) Explain about the rules present in style sheets?
A huge list of rules is defined for style sheets. Each rule consists of selectors and declaration block. A declaration block consists of declarations which can be defined and separated by using a semicolon within curly braces. Also each declaration consists of a colon, a property and a semicolon.

4) Explain about the hover element?
A hover element is activated when the user moves a pointer over the area where HTML coding is defined. This style is being extensively used for online advertising. It is appended to #elementid:hover.

5) State some of the uses of CSS?
CSS offers many possibilities to a designer and developer. Some of them are
1) Moving of the entire style sheet coding to a separate external folder.
2) Repetition and code reuse features make CSS rich.
3) Presentation and structure are made different by CSS etc.

6) State the different type of author styles?
A web page author, developer, designer, etc can describe styles in three different forms they are
1) External style sheets
2) Embedded style
3) Inline styles
4) Local and default style sheet.
A default style sheet consists of the style imparted by the browser which the user is accessing for the information.

7) What are the main goals of applying style sheets?
The main use of style sheet is to give the user a greater degree of control over his presentation. If the user does not like a certain font he can change it with flexibility without any difficulty.
Also a developer can minimize the effects which a browser can have on the application or the text part of the webpage.
Control over the entire web page without any external influences, separation of the page from the HTML code part.

8) Explain about CSS1?
W3C recommended adoption of CSS1in 1996. Some of the capabilities and features present in CSS1 are as follows.
1) Font properties
2) Background colors, text colors, etc
3) Spacing between text, words, etc
4) Tables, images alignment
5) Border, margin, padding and positioning of elements
6) Attributes are uniquely identified and classified generically.
W3C still adopts the specifications put forwarded in CSS1.

9) What are the additional features which were present in CSS2 compared to CSS1?
Many of the new features were present in CSS2 some of them are as follows.
1) Positioning of elements will be according to the relative, fixed and the absolute positioning.
2) Inclusion of large number of media functions.
3) Shadows, bidirectional support for text and aural style sheets.

10) Explain about CSS filter?

CSS filter solves designers and coders difficulties. With the help of these filters one can write entirely different code or modify the existing design patterns so that browsers receive CSS specifications which they support, thereby not allowing the browsers to make or create any unnecessary changes.

11) Explain about Internet explorer box model bug?
Designers had a very tough time dealing with this bug, because it will not display box widths appropriately on the webpage. It displayed the block to be narrow in size. This bug can be rectified by using CSS filter and hacks. Also correct usage and documentation of XHTML can solve the problems.

12) Explain about vertical control limitation?
Vertical control limitations are always a nightmare for a designer. Horizontal positioning of text or element is always easy but vertically positioning an element always leads to convoluted and impossible tasks. CSS has unsupported rules for vertical placement of elements.

13) Explain about absence of expressions?
CSS currently does not have the ability to specify property values as simple expressions. For example if you want to calculate the size of all the columns but you have a restriction on the sum of all columns. This problem has been solved by many browsers by proprietary expressions which did the job well.

14) Explain about lack of orthogonality?
Lack of orthogonality explains about the various multiple jobs which are either undefined correctly for a specific application or used multiple times for the same job. CSS defines that internal elements of a table will not have margins so usage of border spacing is appropriate which leads to confusion.

15) Explain about the ease of maintenance with CSS.
An effective style sheet has effective use of inheritance and cascading style sheets. When changes are applied to a single element of this global style sheet every element of the web page changes. This made the maintenance easy because here we can change the style of the whole page by effecting a change to a single element.

16) Explain about float containment?
CSS does not support float elements as it can cause overflow of the elements. Floats also tend to vary according to the web browser resolution and size but positions do not. There are some multiple properties which can define about float but they have their own limitations.

17) State some limitations of style sheets?

Style sheets do have its own share of limitations some of them are as follows: -
1) Inconsistent browser support
2) Vertical control limitations
3) Margin collapsing, float containment, control of element shapes, etc
4) Lack of column declaration and variables are some of the limitations present in CSS.

C Sharp Interview Questions/Answers Part-2

Posted by imomins on April 2, 2013 at 8:00 AM Comments comments (0)

What is .NET Remoting?
.NET Remoting allows objects to interact with one another across application domains.

What are the 2 message encoding formats supported by .NET Remoting and when do you choose one over the other?
Message Encoding Formats:
1. Binary encoding.
2. XML encoding.

Applications can use binary encoding where performance is critical, or XML encoding where interoperability with other remoting frameworks is essential.

What are the two types of .NET remote objects?
1. Client-activated objects - Client-activated objects are under the control of a lease-based lifetime manager that ensures that the object is garbage collected when its lease expires.
2. Server-activated objects - In the case of server-activated objects, developers have a choice of selecting either a "single call" or "singleton" model. The lifetime of singletons are also controlled by lease-based lifetime.

What is considered as Remote Object?
Any object outside the application domain of the calling appication is considered remote object, even if the objects are executing on the same machine.

Can you treat every object as a remote object?
Objects that cannot be serialized cannot be passed to a different application domain and are therefore nonremotable.

What are the ways in which an object can be serialized?
1. Mark your class with serializable attribute.
2. Make your class implement ISerializable interface.

How can you change an object into a remote object?
Any object can be changed into a remote object by deriving it from MarshalByRefObject. 

What happens when a client activates a remote object?
When a client activates a remote object, it receives a proxy to the remote object. All operations on this proxy are appropriately indirected to enable the remoting infrastructure to intercept and forward the calls appropriately.

What are proxy objects and what is the use of these proxy objects?
Proxy objects are created when a client activates a remote object. The proxy object acts as a representative of the remote object and ensures that all calls made on the proxy are forwarded to the correct remote object instance.

What is the difference between method parameters and method arguments. Give an example?
In the example below FirstNumber and SecondNumber are method parameters where as FN and LN are method arguments. The method definition specifies the names and types of any parameters that are required. When calling code calls the method, it provides concrete values called arguments for each parameter. The arguments must be compatible with the parameter type but the argument name (if any) used in the calling code does not have to be the same as the parameter named defined in the method.

Code:
using System;
namespace Demo
{
class Program
{
  public static void Main()
  {
   int FN = 10;
   int SN = 20;
   //FN and LN are method arguments
   int Total = Sum(FN, SN);
   Console.WriteLine(Total);
  }
  //FirstNumber and SecondNumber are method parameters
  public static int Sum(int FirstNumber, int SecondNumber)
  {
   int Result = FirstNumber + SecondNumber;
   return Result;
  }
}
}


Can you pass value types by reference to a method?
Yes, we can pass value types by by reference to a method. An example is shown below.

Code:
using System;
namespace Demo
{
class Program
{
  public static void Main()
  {
   int I = 10;
   Console.WriteLine("Value of I before passing to the method = " + I);
   Function(ref I);
   Console.WriteLine("Value of I after passing to the method by reference= " + I);
  }
  public static void Function(ref int Number)
  {
   Number = Number + 5;
  }
}
}


What is the difference between static class and class with static methods? In which case I should use either of them?
If your class has only static members you never need an instance of that class so you should make the class itself static but if your class has instance members (non static) then you have to make your class an instance class to access its instance members via instances of your class.

If a method's return type is void, can you use a return keyword in the method?
Yes, Even though a method's return type is void, you can use the return keyword to stop the execution of the method as shown in the example below.

Code:
using System;
namespace Demo
{
class Program
{
  public static void Main()
  {
   SayHi();
  }
  public static void SayHi()
  {
   Console.WriteLine("Hi");
   return;
   Console.WriteLine("This statement will never be executed");
  }
}
}


How do you create empty strings in C#? 
Using string.empty as shown in the example below.
string EmptyString = string.empty;

What is the difference between System.Text.StringBuilder and System.String?
1. Objects of type StringBuilder are mutable where as objects of type System.String are immutable. 
2. As StringBuilder objects are mutable, they offer better performance than string objects of type System.String.
3. StringBuilder class is present in System.Text namespace where String class is present in System namespace.

What is the difference between int.Parse and int.TryParse methods? 
Parse method throws an exception if the string you are trying to parse is not a valid number where as TryParse returns false and does not throw an exception if parsing fails. Hence TryParse is more efficient than Parse.

What is the difference between string keyword and System.String class? 
string keyword is an alias for Syste.String class. Therefore, System.String and string keyword are the same, and you can use whichever naming convention you prefer. The String class provides many methods for safely creating, manipulating, and comparing strings.

Are string objects mutable or immutable? 
String objects are immutable.

What do you mean by String objects are immutable?
String objects are immutable means, they cannot be changed after they have been created. All of the String methods and C# operators that appear to modify a string actually return the results in a new string object. In the following example, when the contents of s1 and s2 are concatenated to form a single string, the two original strings are unmodified. The += operator creates a new string that contains the combined contents. That new object is assigned to the variable s1, and the original object that was assigned to s1 is released for garbage collection because no other variable holds a reference to it.

Code:
string s1 = "First String ";
string s2 = "Second String";

// Concatenate s1 and s2. This actually creates a new
// string object and stores it in s1, releasing the
// reference to the original object.
s1 += s2;

System.Console.WriteLine(s1);
// Output: First String Second String


What is an array? 
An array is a data structure that contains several variables of the same type.

What are the 3 different types of arrays?
1. Single-Dimensional
2. Multidimensional
3. Jagged

What is Jagged Array? 
A jagged array is an array of arrays.

Are arrays value types or reference types?
Arrays are reference types.

What is the base class for Array types? 
System.Array

Can you use foreach iteration on arrays in C#?
Yes,Since array type implements IEnumerable, you can use foreach iteration on all arrays in C#.

What is Boxing and Unboxing? 
Boxing - Converting a value type to reference type is called boxing. An example is shown below.

Code:
int i = 101;
object obj = (object)i; // Boxing

Unboxing - Converting a reference type to a value typpe is called unboxing. An example is shown below.

Code:
obj = 101;
i = (int)obj; // Unboxing


Is boxing an implicit conversion?
Yes, boxing happens implicitly.

Is unboxing an implicit conversion? 
No, unboxing is an explicit conversion.

What happens during the process of boxing?
Boxing is used to store value types in the garbage-collected heap. Boxing is an implicit conversion of a value type to the type object or to any interface type implemented by this value type. Boxing a value type allocates an object instance on the heap and copies the value into the new object. Due to this boxing and unboxing can have performance impact.

What are the 4 pillars of any object oriented programming language?
1. Abstraction
2. Inheritance
3. Encapsulation
4. Polymorphism

Do structs support inheritance?
No, structs do not support inheritance, but they can implement interfaces.

What is the main advantage of using inheritance? 
Code reuse

Does C# support multiple class inheritance?
No, C# supports single class inheritance only. However classes can implement multiple interfaces at the same time.

What is an abstract class? 
An abstract class is an incomplete class and must be implemented in a derived class.

Can you create an instance of an abstract class?
No, abstract classes are incomplete and you cannot create an instance of an abstract class.

What is a sealed class? 
A sealed class is a class that cannot be inherited from. This means, If you have a class called Customer that is marked as sealed. No other class can inherit from Customer class. For example, the below code generates a compile time error "MainClass cannot derive from sealed type Customer.

Code:
using System;
public sealed class Customer
{
}
public class MainClass : Customer
{
public static void Main()
{
}
}

What are abstract methods? 
Abstract methods are methods that only the declaration of the method and no implementation.

Can a sealed class be used as a base class? 
No, sealed class cannot be used as a base class. A compile time error will be generated.

Explain polymorphism in C# with a simple example? 
Polymorphism allows you to invoke derived class methods through a base class reference during run-time. An example is shown below.

Code:
using System;
public class DrawingObject
{
public virtual void Draw()
{
Console.WriteLine("I am a drawing object.");
}
}
public class Triangle : DrawingObject
{
public override void Draw()
{
Console.WriteLine("I am a Triangle.");
}
}
public class Circle : DrawingObject
{
public override void Draw()
{
Console.WriteLine("I am a Circle.");
}
}
public class Rectangle : DrawingObject
{
public override void Draw()
{
Console.WriteLine("I am a Rectangle.");
}
}
public class DrawDemo
{
public static void Main()
{
DrawingObject[] DrawObj = new DrawingObject[4];

DrawObj[0] = new Triangle();
DrawObj[1] = new Circle();
DrawObj[2] = new Rectangle();
DrawObj[3] = new DrawingObject();

foreach (DrawingObject drawObj in DrawObj)
{
drawObj.Draw();
}
}
}

When can a derived class override a base class member? 
A derived class can override a base class member only if the base class member is declared as virtual or abstract.

What is the difference between a virtual method and an abstract method? 
A virtual method must have a body where as an abstract method should not have a body.

Can fields inside a class be virtual?
No, Fields inside a class cannot be virtua. Only methods, properties, events and indexers can be virtual.

What are Access Modifiers in C#? 
In C# there are 5 different types of Access Modifiers.
Public 
The public type or member can be accessed by any other code in the same assembly or another assembly that references it.

Private
The type or member can only be accessed by code in the same class or struct.

Protected
The type or member can only be accessed by code in the same class or struct, or in a derived class.

Internal
The type or member can be accessed by any code in the same assembly, but not from another assembly.

Protected Internal 
The type or member can be accessed by any code in the same assembly, or by any derived class in another assembly.

What are Access Modifiers used for?
Access Modifiers are used to control the accessibilty of types and members with in the types.

Can you use all access modifiers for all types? 
No, Not all access modifiers can be used by all types or members

C Sharp Interview Questions/Answers Part-1

Posted by imomins on April 2, 2013 at 7:55 AM Comments comments (0)

What are the new features introduced in c# 4.0?
This question is basically asked to check, if you are passionate about catching up with latest technological advancements. The list below shows a few of the new features introduced in c# 4.0. If you are aware of any other new features, please submit those using the from at the end of this post.
1. Optional and Named Parameters
2. COM Interoperability Enhancements
3. Covariance and Contra-variance
4. Dynamic Type Introduction

What's the difference between IEnumerable<T> and List<T> ?
1. IEnumerable is an interface, where as List is one specific implementation of IEnumerable. List is a class.
2. FOR-EACH loop is the only possible way to iterate through a collection of IEnumerable, where as List can be iterated using several ways. List can also be indexed by an int index, element can be added to and removed from and have items inserted at a particular index.
3. IEnumerable doesn't allow random access, where as List does allow random access using integral index.
4. In general from a performance standpoint, iterating thru IEnumerable is much faster than iterating thru a List.

Difference between EXE and DLL?
1. .EXE is an executable file and can run by itself as an application, where as .DLL is usullay consumed by a .EXE or by another .DLL and we cannot run or execute .DLL directly.
2. For example, In .NET, compiling a Console Application or a Windows Application generates .EXE, where as compiling a Class Library Project or an ASP.NET web application generates .DLL. In .NET framework, both .EXE and .DLL are called as assemblies.

What are the difference between interfaces and abstract classes?
1. Abstract classes can have implementations for some of its members, but the interface can't have implementation for any of its members.
2. Interfaces cannot have fields where as an abstract class can have fields.
3. An interface can inherit from another interface only and cannot inherit from an abstract class, where as an abstract class can inherit from another abstract class or another interface.
4. A class can inherit from multiple interfaces at the same time, where as a class cannot inherit from multiple classes at the same time.
5. Abstract class members can have access modifiers where as interface members cannot have access modifiers.

What is a delegate?

A delegate is a type safe function pointer. Using delegates you can pass methods as parameters. To pass a method as a parameter, to a delegate, the signature of the method must match the signature of the delegate. This is why, delegates are called type safe function pointers.

What is the main use of delegates in C#?
Delegates are mainly used to define call back methods.

What do you mean by chaining delegates?
Or
What is a multicast delegate?
The capability of calling multiple methods on a single event is called as chaining delegates. Let me give you an example to understand this further.
1. Create a new asp.net web application
2. Drag and drop a button control and leave the ID as Button1. 
3. On the code behind file, add the code shown below.
[Image: Delegates.png]
When you click the Button now, both Method1 and Method2 will be executed. So, this capability of calling multiple methods on a single event is called as chaining delegates. In the example, we are using EventHandler delegate, to hook up Method1 and Method2 to the click event of the button control. Since, the EventHandler delegate is now pointing to multiple methods, it is also called as multicast delegate.

What are the advantages of using interfaces?
Interfaces are very powerful. If properly used, interfaces provide all the advantages as listed below. 
1. Interfaces allow us to implement polymorphic behaviour. Ofcourse, abstract classes can also be used to implement polymorphic behaviour.
2. Interfaces allow us to develop very loosely coupled systems.
3. Interfaces enable mocking for better unit testing.
4. Interfaces enables us to implement multiple class inheritance in C#.
5. Interfaces are great for implementing Inverson of Control or Dependancy Injection.
6. Interfaces enable parallel application development.

What are the advantages and disadvantages of using arrays?
Advantages of using arrays:
1. Arrays are strongly typed, meaning you can only have one type of elements in the array. The strongly typed nature of arrays gives us 
2 advantages. One, the performance will be much better because boxing and unboxing will not happen. Second, run time errors can be prevented because of type mis matches. Type mis matches and runtime errors are most commonly seen with collection classes like ArrayList, Queue, Stack etc, that are present in System.Collections namespace. 
Disadvantages of using arrays:
1. Arrays are fixed in size and cannot grow over time, where ArrayList in System.Collections namespace can grow dynamically.
2. Arrays are zero index based, and hence a little difficult to work with. The only way to store or retrieve elements from arrays, is to use integral index. Arrays donot provide convinient methods like Add(), Remove() etc provided by collection classes found in System.Collections or System.Collections.Generics namespaces, which are very easy to work with.

Explain what is an Interface in C#?
An Interface in C# is created using the interface keyword. An example is shown below.

Code:
using System;
namespace Interfaces
{
interface IBankCustomer
{
void DepositMoney();
void WithdrawMoney();
}
public class Demo : IBankCustomer
{
public void DepositMoney()
{
Console.WriteLine("Deposit Money");
}

public void WithdrawMoney()
{
Console.WriteLine("Withdraw Money");
}

public static void Main()
{
Demo DemoObject = new Demo();
DemoObject.DepositMoney();
DemoObject.WithdrawMoney();
}
}
}


Can an Interface contain fields?
No, an Interface cannot contain fields.

Can an interface inherit from another interface?
Yes, an interface can inherit from another interface. It is possible for a class to inherit an interface multiple times, through base classes or interfaces it inherits. In this case, the class can only implement the interface one time, if it is declared as part of the new class. If the inherited interface is not declared as part of the new class, its implementation is provided by the base class that declared it. It is possible for a base class to implement interface members using virtual members; in that case, the class inheriting the interface can change the interface behavior by overriding the virtual members.

Can you create an instance of an interface?
No, you cannot create an instance of an interface.

What is a partial class. Give an example?
A partial class is a class whose definition is present in 2 or more files. Each source file contains a section of the class, and all parts are combined when the application is compiled. To split a class definition, use the partial keyword as shown in the example below. Student class is split into 2 parts. The first part defines the study() method and the second part defines the Play() method. When we compile this program both the parts will be combined and compiled. Note that both the parts uses partial keyword and public access modifier.

Code:
using System;
namespace PartialClass
{
  public partial class Student
  {
    public void Study()
    {
      Console.WriteLine("I am studying");
    }
  }
  public partial class Student
  {
    public void Play()
    {
      Console.WriteLine("I am Playing");
    }
  }
  public class Demo
  {
    public static void Main()
    {
      Student StudentObject = new Student();
      StudentObject.Study();
      StudentObject.Play();
    }
  }
}

It is very important to keep the following points in mind when creating partial classes.
1. All the parts must use the partial keyword.
2. All the parts must be available at compile time to form the final class.
3. All the parts must have the same access modifiers - public, private, protected etc.
4. Any class members declared in a partial definition are available to all the other parts. 
5. The final class is the combination of all the parts at compile time.

What are the advantages of using partial classes?
1. When working on large projects, spreading a class over separate files enables multiple programmers to work on it at the same time.

2. When working with automatically generated source, code can be added to the class without having to recreate the source file. Visual Studio uses this approach when it creates Windows Forms, Web service wrapper code, and so on. You can create code that uses these classes without having to modify the file created by Visual Studio.

Is it possible to create partial structs, interfaces and methods?
Yes, it is possible to create partial structs, interfaces and methods. We can create partial structs, interfaces and methods the same way as we create partial classes.

Can you create partial delegates and enumerations?
No, you cannot create partial delegates and enumerations.

Can different parts of a partial class inherit from different interfaces?
Yes, different parts of a partial class can inherit from different interfaces. 

Can you specify nested classes as partial classes?
Yes, nested classes can be specified as partial classes even if the containing class is not partial. An example is shown below.

Code:
class ContainerClass
{
  public partial class Nested
  {
    void Test1() { }
  }
  public partial class Nested
  {
    void Test2() { }
  }
}


How do you create partial methods?
To create a partial method we create the declaration of the method in one part of the partial class and implementation in the other part of the partial class. The implementation is optional. If the implementation is not provided, then the method and all the calls to the method are removed at compile time. Therefore, any code in the partial class can freely use a partial method, even if the implementation is not supplied. No compile-time or run-time errors will result if the method is called but not implemented. In summary a partial method declaration consists of two parts. The definition, and the implementation. These may be in separate parts of a partial class, or in the same part. If there is no implementation declaration, then the compiler optimizes away both the defining declaration and all calls to the method.

The following are the points to keep in mind when creating partial methods.
1. Partial method declarations must begin partial keyword.
2. The return type of a partial method must be void.
3. Partial methods can have ref but not out parameters.
4. Partial methods are implicitly private, and therefore they cannot be virtual.
5. Partial methods cannot be extern, because the presence of the body determines whether they are defining or implementing.

What is the use of partial methods?
Partial methods can be used to customize generated code. They allow for a method name and signature to be reserved, so that generated code can call the method but the developer can decide whether to implement the method. Much like partial classes, partial methods enable code created by a code generator and code created by a human developer to work together without run-time costs.

What is a nested type. Give an example?
A type(class or a struct) defined inside another class or struct is called a nested type. An example is shown below. InnerClass is inside ContainerClass, Hence InnerClass is called as nested class.

Code:
using System;
namespace Nested
{
  class ContainerClass
  {
    class InnerClass
    {
      public string str = "A string variable in nested class";
    }

    public static void Main()
    {
      InnerClass nestedClassObj = new InnerClass();
      Console.WriteLine(nestedClassObj.str);
    }
  }
}


What is a Destructor?
A Destructor has the same name as the class with a tilde character and is used to destroy an instance of a class.

Can a class have more than 1 destructor? 
No, a class can have only 1 destructor.

Can structs in C# have destructors?
No, structs can have constructors but not destructors, only classes can have destructors.

Can you pass parameters to destructors? 
No, you cannot pass parameters to destructors. Hence, you cannot overload destructors.

Can you explicitly call a destructor?
No, you cannot explicitly call a destructor. Destructors are invoked automatically by the garbage collector.

Why is it not a good idea to use Empty destructors? 
When a class contains a destructor, an entry is created in the Finalize queue. When the destructor is called, the garbage collector is invoked to process the queue. If the destructor is empty, this just causes a needless loss of performance.

Is it possible to force garbage collector to run?
Yes, it possible to force garbage collector to run by calling the Collect() method, but this is not considered a good practice because this might create a performance over head. Usually the programmer has no control over when the garbage collector runs. The garbage collector checks for objects that are no longer being used by the application. If it considers an object eligible for destruction, it calls the destructor(if there is one) and reclaims the memory used to store the object.

Usually in .NET, the CLR takes care of memory management. Is there any need for a programmer to explicitly release memory and resources? If yes, why and how?
If the application is using expensive external resource, it is recommend to explicitly release the resource before the garbage collector runs and frees the object. We can do this by implementing the Dispose method from the IDisposable interface that performs the necessary cleanup for the object. This can considerably improve the performance of the application.

When do we generally use destructors to release resources?
If the application uses unmanaged resources such as windows, files, and network connections, we use destructors to release resources.

What is a constructor in C#?
Constructor is a class method that is executed when an object of a class is created. Constructor has the same name as the class, and usually used to initialize the data members of the new object. 

In C#, What will happen if you do not explicitly provide a constructor for a class?
If you do not provide a constructor explicitly for your class, C# will create one by default that instantiates the object and sets all the member variables to their default values.

Structs are not reference types. Can structs have constructors?
Yes, even though Structs are not reference types, structs can have constructors.

We cannot create instances of stat

asp.net interview questions:Part#03

Posted by imomins on April 2, 2013 at 7:55 AM Comments comments (0)

1 :: What is view state and use of it?
The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested for the first time versus when the form is posted (sent to the server), which allows you to program accordingly. 

2 :: What are user controls and custom controls?
Custom controls:
A control authored by a user or a third-party software vendor that does not belong to the .NET Framework class library. This is a generic term that includes user controls. A custom server control is used in Web Forms (ASP.NET pages). A custom client control is used in Windows Forms applications.

User Controls:
In ASP.NET: A user-authored server control that enables an ASP.NET page to be re-used as a server control. An ASP.NET user control is authored declaratively and persisted as a text file with an .ascx extension. The ASP.NET page framework compiles a user control on the fly to a class that derives from the System.Web.UI.UserControl class. 

3 :: What are the validation controls?
A set of server controls included with ASP.NET that test user input in HTML and Web server controls for programmer-defined requirements. Validation controls perform input checking in server code. If the user is working with a browser that supports DHTML, the validation controls can also perform validation using client script. 

4 :: What is the difference between Response.Write() and Response.Output.Write()?
The latter one allows you to write formatted output. 

5 :: What methods are fired during the page load? Init()

When the page is instantiated, Load() - when the page is loaded into server memory,PreRender () - the brief moment before the page is displayed to the user as HTML, Unload() - when page finishes loading. 

6 :: Where does the Web page belong in the .NET Framework class hierarchy?
System.Web.UI.Page

7 :: What is the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode.aspx.cs" mce_Src="MyCode.aspx.cs" mce_Src="MyCode.aspx.cs"?

CodeBehind is relevant to Visual Studio.NET only.

8 :: What is a bubbled event?
When you have a complex control, likeDataGrid, writing an event processing routine for each object (cell, button,row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.
Suppose you want a certain ASP.NET function executed on MouseOver over a certain button.

9 :: What data type does the RangeValidator control support?
Integer,String and Date.

10 :: What are the different types of caching?

Caching is a technique widely used in computing to increase performance by keeping frequently accessed or expensive data in memory. In context of web application, caching is used to retain the pages or data across HTTP requests and reuse them without the expense of recreating them.ASP.NET has 3 kinds of caching strategiesOutput CachingFragment CachingData

CachingOutput Caching:
 Caches the dynamic output generated by a request. Some times it is useful to cache the output of a website even for a minute, which will result in a better performance. For caching the whole page the page should have OutputCache directive.
<%@ OutputCache Duration="60" VaryByParam="state" %>

Fragment Caching:
 Caches the portion of the page generated by the request. Some times it is not practical to cache the entire page, in such cases we can cache a portion of page<%@ OutputCache Duration="120" VaryByParam="CategoryID;SelectedID"%>

Data Caching: Caches the objects programmatically. For data caching asp.net provides a cache object for eg: cache["States"] = dsStates;

11 :: What do you mean by authentication and authorization?

Authentication is the process of validating a user on the credentials (username and password) and authorization performs after authentication. After Authentication a user will be verified for performing the various tasks, It access is limited it is known as authorization.

12 :: What are different types of directives in .NET?
@Page: Defines page-specific attributes used by the ASP.NET page parser and compiler. Can be included only in .aspx files <%@ Page AspCompat="TRUE" language="C#" %>

@Control:Defines control-specific attributes used by the ASP.NET page parser and compiler. Can be included only in .ascx files. <%@ Control Language="VB" EnableViewState="false" %>

@Import: Explicitly imports a namespace into a page or user control. The Import directive cannot have more than one namespace attribute. To import multiple namespaces, use multiple @Import directives. <% @ Import Namespace="System.web" %>

@Implements:
 Indicates that the current page or user control implements the specified .NET framework interface.<%@ Implements Interface="System.Web.UI.IPostBackEventHandler" %>

@Register:
 Associates aliases with namespaces and class names for concise notation in custom server control syntax.<%@ Register Tagprefix="Acme" Tagname="AdRotator" Src="AdRotator.ascx" mce_Src="AdRotator.ascx" mce_Src="AdRotator.ascx" %>

@Assembly:
 Links an assembly to the current page during compilation, making all the assembly's classes and interfaces available for use on the page. <%@ Assembly Name="MyAssembly" %><%@ Assembly Src="MySource.vb" mce_Src="MySource.vb" mce_Src="MySource.vb" %>

13 :: Can a user browsing my Web site read my Web.config or Global.asax files?
No. The section of Machine.config, which holds the master configuration settings for ASP.NET, contains entries that map ASAX files, CONFIG files, and selected other file types to an HTTP handler named HttpForbiddenHandler, which fails attempts to retrieve the associated file. You can modify it by editing Machine.config or including an section in a local Web.config file.

14 :: How do I debug an ASP.NET application that was not written with Visual Studio.NET and that does not use code-behind?

Start the DbgClr debugger that comes with the .NET Framework SDK, open the file containing the code you want to debug, and set your breakpoints. Start the ASP.NET application. Go back to DbgClr, choose Debug Processes from the Tools menu, and select aspnet_wp.exe from the list of processes. (If aspnet_wp.exe doesn't appear in the list,check the "Show system processes" box.) Click the Attach button to attach to aspnet_wp.exe and begin debugging.
Be sure to enable debugging in the ASPX file before debugging it with DbgClr. You can enable tell ASP.NET to build debug executables by placing a
<%@ Page Debug="true" %> statement at the top of an ASPX file or a statement in a Web.config file.

15 :: What is the difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScript?
RegisterClientScriptBlock is for returning blocks of client-side script containing functions. RegisterStartupScript is for returning blocks of client-script not packaged in functions-in other words, code that's to execute when the page is loaded. The latter positions script blocks near the end of the document so elements on the page that the script interacts are loaded before the script runs.<%@ Reference Control="MyControl.ascx" %>

16 :: Is it necessary to lock application state before accessing it?
Only if you're performing a multistep update and want the update to be treated as an atomic operation. Here's an example:

Code:
Application.Lock ();
Application["ItemsSold"] = (int) Application["ItemsSold"] + 1;
Application["ItemsLeft"] = (int) Application["ItemsLeft"] - 1;
Application.UnLock ();

By locking application state before updating it and unlocking it afterwards, you ensure that another request being processed on another thread doesn't read application state at exactly the wrong time and see an inconsistent view of it. If I update session state, should I lock it, too? Are concurrent accesses by multiple requests executing on multiple threads a concern with session state?
Concurrent accesses aren't an issue with session state, for two reasons. One, it's unlikely that two requests from the same user will overlap. Two, if they do overlap, ASP.NET locks down session state during request processing so that two threads can't touch it at once. Session state is locked down when the HttpApplication instance that's processing the request fires an AcquireRequestState event and unlocked when it fires a ReleaseRequestState event.

17 :: How do I send e-mail from an ASP.NET application?

Code:
MailMessage message = new MailMessage ();
message.From = ;
message.To = ;
message.Subject = "Scheduled Power Outage";
message.Body = "Our servers will be down tonight.";
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send (message);


MailMessage and SmtpMail are classes defined in the .NET Framework Class Library's System.Web.Mail namespace. Due to a security change made to ASP.NET just before it shipped, you need to set SmtpMail's SmtpServer property to "localhost" even though "localhost" is the default. In addition, you must use the IIS configuration applet to enable localhost (127.0.0.1) to relay messages through the local SMTP service.

18 :: What are VSDISCO files?
VSDISCO files are DISCO files that support dynamic discovery of Web services. If you place the following VSDISCO file in a directory on your Web server, for example, it returns references to all ASMX and DISCO files in the host directory and any subdirectories not noted in elements:

xmlns="urn:schemas-dynamicdiscovery:disco.2009-03-17">

19 :: How does dynamic discovery work?

ASP.NET maps the file name extension VSDISCO to an HTTP handler that scans the host directory and subdirectories for ASMX and DISCO files and returns a dynamically generated DISCO document. A client who requests a VSDISCO file gets back what appears to be a static DISCO document.
Note that VSDISCO files are disabled in the release version of ASP.NET. You can reenable them by uncommenting the line in the section of Machine.config that maps *.vsdisco to System.Web.Services.Discovery.DiscoveryRequestHandler and granting the ASPNET user account permission to read the IIS metabase. However, Microsoft is actively discouraging the use of VSDISCO files because they could represent a threat to Web server security.

20 :: Is it possible to prevent a browser from caching an ASPX page?
Just call SetNoStore on the HttpCachePolicy object exposed through the Response object's Cache property, as demonstrated here:

Code:
<%@ Page Language="C#" %>
<%
Response.Cache.SetNoStore ();
Response.Write (DateTime.Now.ToLongTimeString ());
%>


SetNoStore works by returning a Cache-Control: private, no-store header in the HTTP response. In this example, it prevents caching of a Web page that shows the current time.

21 :: What does AspCompat="true" mean and when should I use it?
AspCompat is an aid in migrating ASP pages to ASPX pages. It defaults to false but should be set to true in any ASPX file that creates apartment-threaded COM objects--that is, COM objects registered ThreadingModel=Apartment. That includes all COM objects written with Visual Basic 6.0. AspCompat should also be set to true (regardless of threading model) if the page creates COM objects that access intrinsic ASP objects such as Request and Response. The following directive sets AspCompat to true:
<%@ Page AspCompat="true" %>

22 :: Should validation (did the user enter a real date) occur server-side or client-side? Why?
Client-side validation because there is no need to request a server side date when you could obtain a date from the client machine.

23 :: What are ASP.NET Web Forms? How is this technology different than what is available though ASP?

Web Forms are the heart and soul of ASP.NET. Web Forms are the User Interface (UI) elements that give your Web applications their look and feel. Web Forms are similar to Windows Forms in that they provide properties, methods, and events for the controls that are placed onto them. However, these UI elements render themselves in the appropriate markup language required by the request, e.g. HTML. If you use Microsoft Visual Studio .NET, you will also get the familiar drag-and-drop interface used to create your UI for your Web application.

24 :: What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?

In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the properties in the Request object. Sure, there are workarounds, but they're difficult. Finally, Response.Redirect necessitates a round trip to the client, which, on high-volume sites, causes scalability problems.
As you might suspect, Server.Transfer fixes all of these problems. It does this by performing the transfer on the server without requiring a roundtrip to the client.

25 :: How can you provide an alternating color scheme in a Repeater control?
AlternatingItemTemplate Like the ItemTemplate element, but rendered for every other row (alternating items) in the Repeater control. You can specify a different appearance for the AlternatingItemTemplate element by setting its style properties.

26 :: Which template must you provide, in order to display data in a Repeater control?

ItemTemplate

27 :: What event handlers can I include in Global.asax?

Application_Start,Application_End, Application_AcquireRequestState, Application_AuthenticateRequest, Application_AuthorizeRequest, Application_BeginRequest, Application_Disposed, Application_EndRequest, Application_Error, Application_PostRequestHandlerExecute, Application_PreRequestHandlerExecute,
Application_PreSendRequestContent, Application_PreSendRequestHeaders, Application_ReleaseRequestState, Application_ResolveRequestCache, Application_UpdateRequestCache, Session_Start,Session_End
You can optionally include "On" in any of method names. For example, you can name a BeginRequest event handler.Application_BeginRequest or Application_OnBeginRequest.You can also include event handlers in Global.asax for events fired by custom HTTP modules.Note that not all of the event handlers make sense for Web Services (they're designed for ASP.NET applications in general, whereas .NET XML Web Services are specialized instances of an ASP.NET app). For example, the Application_AuthenticateRequest and Application_AuthorizeRequest events are designed to be used with ASP.NET Forms authentication.

asp.net interview questions:Part#02

Posted by imomins on April 2, 2013 at 7:50 AM Comments comments (0)

1. Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page loading process. 

inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things. When an ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe. 

2. What’s the difference between Response.Write() and Response.Output.Write()? 

The latter one allows you to write formatted output. 

3. What methods are fired during the page load? 

Init() - when the page is instantiated, 
Load() - when the page is loaded into server memory, 
PreRender() - the brief moment before the page is displayed to the user as HTML, 
Unload() - when page finishes loading. 

4. Where does the Web page belong in the .NET Framework class hierarchy? 
System.Web.UI.Page 

5. Where do you store the information about the user’s locale? 
System.Web.UI.Page.Culture 

6. What’s the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode.aspx.cs" mce_Src="MyCode.aspx.cs" mce_Src="MyCode.aspx.cs"? CodeBehind is relevant to Visual Studio.NET only. 

7. What’s a bubbled event? 
When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their event handlers, allowing the main DataGrid event handler to take care of its constituents. 

8. Suppose you want a certain ASP.NET function executed on MouseOver over a certain button. Where do you add an event handler? 
It’s the Attributes property, the Add function inside that property. So btnSubmit.Attributes.Add("onMouseOver","someClientCode();") 

9. What data type does the RangeValidator control support? 
Integer, String and Date.

10. Explain the differences between Server-side and Client-side code? 
Server-side code runs on the server. Client-side code runs in the clients’ browser.

11. What type of code (server or client) is found in a Code-Behind class? 
Server-side code.

12. Should validation (did the user enter a real date) occur server-side or client-side? Why? 
Client-side. This reduces an additional request to the server to validate the users input.

13. What does the "EnableViewState" property do? Why would I want it on or off? 
It enables the viewstate on the page. It allows the page to save the users input on a form.

14. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? 

Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect the user to another page or site.

15. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset? 

• A DataSet can represent an entire relational database in memory, complete with tables, relations, and views. 
• A DataSet is designed to work without any continuing onnection to the original data source. 
• Data in a DataSet is bulk-loaded, rather than being loaded on demand. 
• There's no concept of cursor types in a DataSet. 
• DataSets have no current record pointer You can use For Each loops to move through the data. 
• You can store many edits in a DataSet, and write them to the original data source in a single operation. 
• Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources. 

16. Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines? 
This is where you can set the specific variables for the Application and Session objects.

17. If I’m developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users? 
Maintain the login state security through a database.

18. Can you explain what inheritance is and an example of when you might use it? 
When you want to inherit (use the functionality of) another class. Base Class Employee. A Manager class could be derived from the Employee base class.

19. Whats an assembly? 
Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN

20. Describe the difference between inline and code behind. 
Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.

21. Explain what a diffgram is, and a good use for one? 
The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. For reading database data to an XML file to be sent to a Web Service.

22. Whats MSIL, and why should my developers need an appreciation of it if at all? 
MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.

23. Which method do you invoke on the DataAdapter control to load your generated dataset with data? 
The .Fill() method

24. Can you edit data in the Repeater control? 
No, it just reads the information from its data source

25. Which template must you provide, in order to display data in a Repeater control? 
ItemTemplate

26. How can you provide an alternating color scheme in a Repeater control? 
Use the AlternatingItemTemplate

27. What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control? 
You must set the DataSource property and call the DataBind method.

28. What base class do all Web Forms inherit from? 
The Page class.

29. Name two properties common in every validation control? 
ControlToValidate property and Text property.

30. What tags do you need to add within the asp:datagrid tags to bind columns manually? 
Set AutoGenerateColumns Property to false on the datagrid tag

31. What tag do you use to add a hyperlink column to the DataGrid? 
<asp:HyperLinkColumn>

32. What is the transport protocol you use to call a Web service? 
SOAP is the preferred protocol. 

33. True or False: A Web service can only be written in .NET? 
False

34. What does WSDL stand for? 
(Web Services Description Language)

35. Where on the Internet would you look for Web services? 
(http://www.uddi.org)

36. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box? 
DataTextField property 

37. Which control would you use if you needed to make sure the values in two different controls matched? 
CompareValidator Control

38. True or False: To test a Web service you must create a windows application or Web application to consume this service?
False, the webservice comes with a test page and it provides HTTP-GET method to test.

39. How many classes can a single .NET DLL contain? 
It can contain many classes.

50 Important Silverlight Question/Answers

Posted by imomins on April 2, 2013 at 7:50 AM Comments comments (0)

1. What is Microsoft Silverlight?
• Silverlight is a web based technology, launched by Microsoft in April 2007. Silverlight is considered as a competitor to Adobe's Flash. 
• Silverlight is Microsoft's implementation of a cross-browser, cross-platform client framework that allows designers and developers to deliver Rich Internet Applications (RIA) embedded in Web pages. 
• Silverlight is a browser plug-in approximately 6MB in size; it is client-side free software, with an easy and fast (less than 10 sec) one time installation available for any client side browser. 
• It supports advanced data integration, multithreading, HD video using IIS Smooth Streaming, and built-in content protection. Silverlight enables online and offline applications for a broad range of business and consumer scenarios. 
• One of the design goals of the Silverlight technology is to fill the gap between Windows applications and Web applications in terms of creating Graphical User Interfaces (GUI). 
• Silverlight applications are run as client-side applications without the need to refresh the browser to update the UI. However, because of the built-in .NET framework, Silverlight applications can easily integrate with server-side controls and services. Using Silverlight's implementation of the .NET framework, developers can easily integrate existing libraries and code into Silverlight applications. 

2. Why use Silverlight?
• Support for the .NET Framework – if you are already a .NET developer, it is easy to start programming on Silverlight. 
• Support for managed code – you can write programs in your favorite language which .NET CLR supports like C#, VB.NET, dynamic languages (IronPython, IronRuby). 
• Better development tools -Visual Studio 2010, Expression Blend. 
• Large community- More learning resources available compared to Flash. 
• Integration with Enterprise based technologies like WPF, LINQ etc… 
• Silverlight integrates the XAML declarative language with the .NET framework. 
• It is a cross-browser, cross-platform technology which provides a consistent user experience everywhere it runs. 
• The Silverlight plug-in installs in seconds, and leaves a very small footprint. 
• After you install the plug-in, users no longer need to install anything on their workstations to run Silverlight applications. The applications are available to them from whatever browser they are accessing. 
• It runs a client-side application that can read data and update the UI without interrupting the user by refreshing the whole page. 
• It can run asynchronous communications with the server, allowing the UI to continue to function while waiting for the server response. 
• It delivers rich video, audio, and graphics. 

3. Which platforms does Silverlight support?
• Mac OS 
• Windows Vista 
• Windows XP SP2 
• Windows 2000 
• Windows Server 2003 
• Linux (Moonlight) 

4. Which browsers does Silverlight support?
• Microsoft - Internet Explorer 6, 7, 8 
• Mozilla - Firefox 2 and 3 
• Apple - Safari 3 and 4 
• Google - Chrome 

5. What are the system requirements for Silverlight?
The system requirements for Microsoft Silverlight and associated technologies are listed below.
Windows
• Operating System: Windows 7, Windows Vista, Windows XP Service Pack 2 
• Intel® Pentium® III 450MHz or faster processor (or equivalent) 
• 128MB of RAM 
Mac OS
• Operating System: Apple Mac OS X 10.4.8 or above 
• Intel Core™ Duo 1.83GHz or faster processor 
• 128MB of RAM 
Linux

• Moonlight 
6. What is Moonlight?
Moonlight is an Open Source implementation of Silverlight, primarily for Linux and other Unix/X11 based Operating Systems. In September of 2007, Microsoft and Novell announced a technical collaboration that includes access to Microsoft's test suites for Silverlight and the distribution of a Media Pack for Linux users that will contain licensed media codecs for video and audio.
Moonlight 2 was released December 17, 2009

7. What are the goals of Moonlight?
• To run Silverlight applications on Linux. 
• To provide a Linux SDK to build Silverlight applications. 
• To reuse the Silverlight engine built for desktop applications. 

8. Is Silverlight free?
Yes, Microsoft has made the Silverlight browser plug-in freely available for all supported platforms and browsers.

9. What is the difference between Silverlight 1.0 and 2?
• Silverlight 1 is purely AJAX and JavaScript based. All the code has to be written in JavaScript and XAML. 
• Silverlight 2 supports managed code. When the Silverlight 2 runtime is installed, it installs a limited version of the .NET runtime on the client machine. This allows .NET programmers to write managed code to be executed on the client PC, and provides a better user experience to users. Of course, there is security restrictions built in to it so that the code has limited access to the client computer. 
• The biggest change is the implementation of the .NET Framework. If you are familiar with Silverlight 1.0, then you will be used to coding the application functionality in JavaScript. You can still implement functionality using JavaScript; however, you can now also implement functionality using C#, Visual Basic, Python, Ruby, and managed JavaScript. 
• Another major change is the introduction of the XAP package. In Silverlight 1.0, the XAML code was referenced directly by the Silverlight object embedded in the browser. In Silverlight 2, however, the embedded object references an XAP package that contains the XAP file, assemblies, and resources necessary to run the Silverlight application.


10. What is the Silverlight plug-in?
• The Silverlight plug-in is a very lightweight component that is necessary for users to access Silverlight applications. The plug-in download and install takes only a few moments, and do not take up much hard drive space. 
• The Silverlight plug-in is responsible for accessing the Silverlight object in the Web page, downloading and accessing the XAP package, setting up the program environment, and beginning execution of the application. 
• When a Web page containing a Silverlight application is displayed, the user should be given a link to download the plug-in from Microsoft if the plug-in is not already installed. 


11. What is Silverlight Runtime?
Silverlight Runtime is a browser plug-in to support Silverlight enabled applications. If the Silverlight runtime is not installed, browsers will not be able to run Silverlight elements in the browser. You can set up your Silverlight tags in such a way that your browser will automatically prompt the user to download and install the Silverlight plug-in when your application is launched in the browser.
Installing the run time is a onetime operation on the client. Once installed, it will be automatically launched when any Silverlight application is loaded in the browser.
Note: Silverlight plug-in and the runtime, both are the same; however, I am giving two definitions here.


12. What is Silverlight SDK?
Silverlight SDK is a set of tools, documentation, samples, and templates for web developers to enable them to easily develop Silverlight enabled applications. The SDK is not really mandatory to develop Silverlight applications; however, the SDK will make development much easier.

13. What are the tools required to develop Silverlight applications?
To run Silverlight applications in a web browser, you need to have the Silverlight runtime installed on the client browser as a plug-in. This is a light-weight version of the .NET runtime.
However, to develop a Silverlight application, you need something more.
Silverlight SDK: This includes a set of tools required to compile and build Silverlight controls.
If you are comfortable writing HTML using Notepad and compiling .NET applications from console tools, then you just need the Silverlight SDK to develop Silverlight applications.
However, most people use some kind of IDE to develop applications faster.
Microsoft offers two separate tools to develop Silverlight applications:
• Microsoft Expression Studio - This tool is meant for web designers to create rich visual elements for Silverlight applications. Expression Studio is recommended for web designers who create rich internet applications with enhanced visual content and graphics. There are several features provided for creating enhanced graphics elements, with lot of options to pick color, font, etc. 
• Microsoft Visual Studio - This is the integrated development environment from Microsoft to develop .NET applications. Programmers can use Visual Studio to develop Silverlight applications which require programming. Visual Studio allows programmers to develop sophisticated Silverlight applications in any .NET language (like C#, VB.NET etc). 
Here are some other tools that you can use:
• Install Deep Zoom Composer - This tool allows you to prepare your images for use with the Deep Zoom feature in Silverlight 3. 
• Download Silverlight Toolkit - This toolkit is a Microsoft project containing Silverlight controls, components, and utilities that can be downloaded and used in your Silverlight applications. It includes full source code, samples, and tests. 
• Download .NET RIA Services - Microsoft .NET RIA Services simplifies the traditional n-tier application pattern by bringing together the ASP.NET and Silverlight platforms. RIA Services provides a pattern to write application logic that runs on the mid-tier and controls access to data for queries, changes, and custom operations. 

14. Which tool to use - Expression Studio or Visual Studio?
If your Silverlight application includes just graphics and visual elements, then you can use Expression Studio. However, if you are a programmer and if your Silverlight application includes programming logic, then you might want to choose Visual Studio.

15. What are the Silverlight versions available so far?
• Silverlight 1.0: Silverlight 1.0, which was developed under the codename Windows Presentation Foundation/Everywhere (WPF/E), consists of the core presentation framework which is responsible for the user interface (UI), interactivity, and user input, basic UI controls, graphics and animation, media playback, Digital Restrictions Management (DRM), and DOM integration 
• Silverlight 2: Silverlight 2 (previously referred to as version 1.1) includes a version of the .NET Framework, implementing the same full Common Language Runtime (CLR) version as .NET Framework 3.0. The XAML markup as well as the code is compiled into .NET assemblies which are then compressed using Zip and stored in a .xap file. 
• Silverlight 3: Silverlight version 3 was released in July 9, 2009, which is an extension to Silverlight 2.0, and mainly provides improvements in graphics capabilities, media management, application development areas (additional controls, enhanced binding support, and out-of-browser functionality), and integration in the designers' Expression Blend 3 tools. 
• Silverlight 4: Silverlight version 4 was released on April 15, 2010 (along with Silverlight 4 tools for developers). 

16. What is a .xap file?
A .xap file is a Silverlight-based application package (.xap) that is generated when the Silverlight project is built. A .xap file is the compressed output file for a Silverlight application. The .xap file includes AppManifest.xaml, the compiled output assembly of the Silverlight project (.dll), and the resource files referred to by the Silverlight application:
• Web pages like .aspx files and .html files use Silverlight components by loading .xap files using the tag in HTML or by using the tag in ASP.NET pages. 
• ".xap" files (pronounced "zap") use the standard Zip compression algorithm to minimize client download size. Rename this file to SilverlightTest.zip and open it using any decompression tool. You can see that this is just like any other zip file, and it includes the project's output DLL and another file called "AppManifest.xaml". 

17. How does XAP work? 
Once you have created the .xap file , the Silverlight 2 plug-in downloads the file and runs it in a separate work space. 

18. How do I use a .xap file? 
A .xap file is used to contain and transfer the assemblies and resources of a managed code application. This managed code application must be run within the Silverlight 2 browser plug-in. 

19. Can we add a reference to a Class Library project in a Silverlight application project? 

No, you can't add a reference to a Class Library project to a Silverlight application project. You can only add the reference of another Silverlight application project inside a Silverlight application project. However, you can add a reference to a Web Service or WCF Service. 

20. What is a Silverlight.js file? 
Silverlight.js is a helper file which enables websites to create advanced Silverlight installation and instantiation experiences. You can call the createObject and createObjectEx functions defined in this file to embed the Silverlight plug-in in a web page. 

21. What is the use of the ClientBin folder? 
The ClientBin folder is used to place the .xap file of a Silverlight application. You can keep it anywhere in your web application, but this is the default location used by Silverlight. 

22. How to change the default page of a Silverlight application? 
To change the default page of a Silverlight application, you need to set the RootVisual property inside the Application_Startup event of the App.xaml file. Collapse private void Application_Startup(object sender, StartupEventArgs e) { this.RootVisual = new MainPage(); } 

23. What is XAML? 
XAML stands for eXtended Application Markup Language. XAML contains XML that is used to declaratively specify the user interface for Silverlight or WPF applications. For example, if you need to display a rectangle, this is the XAML you need to use.

XAML stands for eXtensible Application Markup Language, and is a declarative markup language that follows the XML rule and is used for developing User Interfaces in WPF and Silverlight technology. XAML files are XML files that generally have the .xaml extension, and separates the UI definition from the run-time logic by using code-behind files, joined to the markup through partial class definitions. XAML has a set of rules that map object elements into classes or structures, attributes into properties or events, and XML namespaces to CLR namespaces. XAML elements map to Microsoft .NET types as defined in referenced assemblies, and the attributes map to members of those types. 

24. What is the AppManifest.xml file? 
First, let’s look at an example AppManifest.xaml file: Collapse The first element in AppManifest.xaml is a Deployment node. This node defines the application, and contains the child AssemblyPart nodes. As you can see the AssemblyPart nodes define what assemblies (DLLs) are contained within the .xap file, and give each of them a name. Now, if you look back up to the top, you'll see the Deployment node has the EntryPointAssembly and EntryPointType attributes. The EntryPointAssembly attribute defines which assembly defined below (as a child AssemblyPart node) is the main assembly (DLL) for the application. And, the EntryPointType attribute specifies the class contained within the assembly (DLL), defined in the EntryPointAssembly attribute, is the main class that will be instantiated to start the application. The Deployment node also has a RuntimeVersion attribute that defines the version of Silverlight the application is built for. 

25. What files are contained within the .xap file? 
The .xap file contains an application manifest (AppManifest.xaml) file and all the necessary DLLs that are required by the application. The first DLL contained is the compiled version of your application and has the same name of your application. In my test, I created an application named "SilverlightApplication1", so the DLL is named "SilverlightApplication1.dll". The rest of the DLLs are the dependencies the application requires. 

26. What is app.xaml? 
App.xaml is a file used by Silverlight applications to declare shared resources like brushes, various style objects, templates etc. Also, the code-behind file of app.xaml.cs is used to handle global application level events like Application_Startup, Application_Exit, and Application_UnhandledException (similar to the Global.asax file for ASP.NET applications). When Visual Studio creates the app.xaml file automatically, it creates a few event handlers with some default code. You can change the code appropriately. Collapse private void Application_Startup(object sender, StartupEventArgs e) { } private void Application_Exit(object sender, EventArgs e) { } private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) { } For ASP.NET developers, the above code will look familiar. This is similar to the application level event handlers in Global.asax. 

27. What is the Silverlight official name? 
Silverlight was formerly code-named "WPF/E". 

28. What are the main features and benefits of Silverlight? 
• Compelling cross-platform user experiences. 
• Flexible programming model with collaboration tools. 
• High-quality media, low-cost delivery. 
• Connected to data, servers, and services. 

29. What is MainPage.xaml? 
When you create a Silverlight project using Visual Studio, it creates a default XAML file called "MainPage.xaml". This is just a dummy start page created by Visual Studio, and it does not contain any visible UI elements. The default contents of the MainPage.xaml file looks like this: Collapse 

30. Which language is Silverlight developed in? 
It was developed using a combination of C# and C++. 

31. Can I consume WCF and ASP.NET Web Services in Silverlight? 

asp.net interview questions:Part#01

Posted by imomins on April 2, 2013 at 7:45 AM Comments comments (0)

 

Life cycle of an ASP .NET page.

Stage Events/Method
Page Initialization Page_Init
View State Loading LoadViewState
Postback data processin LoadPostData
Page Loading Page_Load
PostBack Change Notification RaisePostDataChangedEvent
PostBack Event Handling RaisePostBackEvent
Page Pre Rendering Phase Page_PreRender
View State Saving SaveViewState
Page Rendering Page_Render
Page Unloading Page_UnLoad

1) Explain the .NET architecture.
a) All .Net supported Languages
b) Common Language specification
c) Windows forms / web pages
d) ADO.Net / web services
e) Base class library
f) Common language runtime
g) Operating system.

2) How does u create multiple inheritances in c# and .net?
Multiple inheritances are created by using interfaces.

3) When web.config is called ?
Web.config is an xml configuration file.this never gets called directly unless we need to retrieve the configuration setting.

4) How many web.configs a application can have
one.

5) How does u set language in web.config
a) set the ‘defaultlanguage’ attribute.

6) What does connection string consists of
a) connection string consist of : server name, userid , password , database name.

7) Where do u store connection string
a) connection string can stored in web.config file under configuration / connection string tab.

8) What is abstract class?
Abstract class is a class which cannot be instantiated but inherited by derived classes. This class contains abstract as well as non-abstract methods and members.

9) What is diff b/w interface inheritance and class inheritance
A class can have multiple interface inheritance, but only one.
In interface inheritance : Inherited class must implement all the methods define in that interface. Class inheritance : inherited class may or may not implement all methods of that base class.

10) What are the collection classes?
1) Array list
2) Hash table
3) stack
4) Dictionary
5) Queue

11) What inheritance support vb.net?
a) Single class inheritance and multiple interface inheritance.

12) What is runtime host?
a) Runtime host is local environment where CLR is running.

13) OOPS CONCEPTS
1) Encapsulation : Hiding internal implementation of the objects and provide global interface access to object.
2) Inheritance : The ability of a class to reuse the members and member functions of its base class.
3) Polymorphism : The ability of the objects to be represented in multiple forms. This is possible with overriding and overloading.
4) Abstraction : Describing an object with its unique and relevant characteristics according to specific need.

Object-Oriented concepts?
Class: The formal definition of an object. The class acts as the template from which an instance of an object is created at run time. The class defines the properties of the object and the methods used to control the object’s behaviour.

Object: An object is an instance of a class.

Encapsulation: hides detailed internal specification of an object, and publishes only its external interfaces. Thus, users of an object only need to adhere to these interfaces. By encapsulation, the internal data and methods of an object can be changed without changing the way of how to use the object.

Inheritance: A class that derives from another class - known as the base class - inherits the same methods and properties. This promotes reuse and maintainability.

Abstraction: the describing of objects by defining their unique and relevant characteristics (properties). Whilst an object may have 100s of properties normally only those properties of importance to the situation are described. (eg life policies premiums are normally important; whereas the time of day a policy was purchased is not usually of value).

Polymorphism: Allows objects to be represented in multiple forms. Even though classes are derived or inherited from the same parent class, each derived class will have its own behavior. (Overriding and hiding methods)

14) optimization technique description
1) Avoid unnecessary use of view state which lowers the performance.
2) Avoid the round trips to server.
3) Use connection pooling.
4) Use stored procedures.

15) Diff b/w application and session
a) Application object maintains state on application basis whereas session object maintain the state of the client visited to the application.

16) What is web application virtual directory?
a) Virtual directory is a physical location where actually application folder is situated.

17) Diff b/w Active.exe and Dll
1) Exe has an entry point.
2) If Dll is getting destroyed, exe also destroyed.

18) If cookies are disabled in client browser will session work
a) No. Identities of client gets destroy.

19) The following code executes successfully
Response. Write (“value of i=”+i) ;
a) Yes.

20) What are a Process, Session and Cookie?
1) Process : Is a running thread of application.
2) Session : state used to maintain user state in application.
3) cookie : used to store user identification data on client machine.

21) How is Polymorphism supports in .net?
Polymorphism supports to objects to be represent in different forms..

22) What r the 2 types of polymorphism support in .net?
Overriding and overloading

23) ASP.NET OBJECTS?
Request, Response, Server, Session, application,

24) What is side by side execution
Asynchronous execution in which application keeps on running instead of waiting for the result of previous stage execution.

25) What serialization?
Serialization is a process of conversion an objects into stream of bytes so that they can transfer through the channels.

26) About a class access specifiers and method access specifiers
1) Public : available throughout application.
2) Private : available for class and its inherited class.
3) Protected : restricted to that class only.
4) Internal : available throughout that assembly.

27) What diff b/w overloading and overriding? How can this be .net
Overriding : derived classes follow the same base class method signatures.
Overloading : Derived classes may have different method signature with different parameters.

28) About virtual function and its use
Virtual function is that which is get override by the derived class to implement polymorphism.

How do u implement inheritance in .net?
In c# : we use :

29)if I want to override a method 1 of class A and this class B then how do u declared
answer :
public virtual void method1(){ } ..In class A. public override void method1(){}…………..In class B.

30) About friend and protected friend
Friend / internal : provides access throughout that particular assembly.
Protected friend : provides access for that particular class and to its child classes.

31) About multiple and multilevel Inheritance how to a chive in .net?
Multiple Inheritance: ex. Public void Employee : Persons, Iemployee. Means a class can be inherited by more than one interface OR inherited by one class and
more than one interfaces.
Multi level inheritance: ex. Public void Person () {}, Public void Customer : person {} , Public void employee : customer{}.

32) What is isPostback property?
Is postback is a property of page to check weather the page is loaded first time or in response to the client callback.

Constitution of Bangladesh Bangla

Posted by imomins on March 25, 2013 at 12:05 AM Comments comments (0)

Constitution of Bangladesh Banglaগণপ্রজাতন্ত্রী বাংলাদেশের সংবিধান

[]

১[ বিসমিল্লাহির-রহমানির রহিম

(দয়াময়, পরম দয়ালু, আল্লাহের নামে)]

 

প্রস্তাবনা

 

আমরা, বাংলাদেশের জনগণ, ১৯৭১ খ্রীষ্টাব্দের মার্চ মাসের ২৬ তারিখে স্বাধীনতা ঘোষণা করিয়া ২[ জাতীয় স্বাধীনতার জন্য ঐতিহাসিক যুদ্ধের] মাধ্যমে স্বাধীন ও সার্বভৌম গণপ্রজাতন্ত্রী বাংলাদেশ প্রতিষ্ঠিত করিয়াছি;

 

 

৩[ আমরা অঙ্গীকার করিতেছি যে, যে সকল মহান আদর্শ আমাদের বীর জনগণকে জাতীয় স্বাধীনতার জন্য যুদ্ধে আত্মনিয়োগ ও বীর শহীদদিগকে প্রাণোৎসর্গ করিতে উদ্বুদ্ধ করিয়াছিল সর্বশক্তিমান আল্লাহের উপর পূর্ণ আস্থা ও বিশ্বাস, জাতীয়তাবাদ, গণতন্ত্র এবং সমাজতন্ত্র অর্থাৎ অর্থনৈতিক ও সামাজিক সুবিচারের সেই সকল আদর্শ এই সংবিধানের মূলনীতি হইবে;]

 

 

আমরা আরও অঙ্গীকার করিতেছি যে, আমাদের রাষ্ট্রের অন্যতম মূল লক্ষ্য হইবে গণতান্ত্রিক পদ্ধতিতে এমন এক শোষণমুক্ত সমাজতান্ত্রিক সমাজের প্রতিষ্ঠা- যেখানে সকল নাগরিকের জন্য আইনের শাসন, মৌলিক মানবাধিকার এবং রাজনৈতিক, অর্থনৈতিক ও সামাজিক সাম্য, স্বাধীনতা ও সুবিচার নিশ্চিত হইবে;

 

 

আমরা দৃঢ়ভাবে ঘোষণা করিতেছি যে, আমরা যাহাতে স্বাধীন সত্তায় সমৃদ্ধি লাভ করিতে পারি এবং মানবজাতির প্রগতিশীল আশা-আকাঙ্খার সহিত সঙ্গতি রক্ষা করিয়া আন্তর্জাতিক শান্তি ও সহযোগিতার ক্ষেত্রে পূর্ণ ভূমিকা পালন করিতে পারি, সেইজন্য বাংলাদেশের জনগণের অভিপ্রায়ের অভিব্যক্তিস্বরূপ এই সংবিধানের প্রাধান্য অক্ষুণ্ন রাখা এবং ইহার রক্ষণ, সমর্থন ও নিরাপত্তাবিধান আমাদের পবিত্র কর্তব্য;

 

 

এতদ্বারা আমাদের এই গণপরিষদে, অদ্য তের শত ঊনআশী বঙ্গাব্দের কার্তিক মাসের আঠারো তারিখ, মোতাবেক ঊনিশ শত বাহাত্তর খ্রীষ্টাব্দের নভেম্বর মাসের চার তারিখে, আমরা এই সংবিধান রচনা ও বিধিবদ্ধ করিয়া সমবেতভাবে গ্রহণ করিলাম।

 

 

 

প্রথম ভাগ

প্রজাতন্ত্র

প্রজাতন্ত্র

১৷ বাংলাদেশ একটি একক, স্বাধীন ও সার্বভৌম প্রজাতন্ত্র, যাহা “গণপ্রজাতন্ত্রী বাংলাদেশ” নামে পরিচিত হইবে৷

প্রজাতন্ত্রের রাষ্ট্রীয় সীমানা

২৷ প্রজাতন্ত্রের রাষ্ট্রীয় সীমানার অন্তর্ভুক্ত হইবে

 

(ক) ১৯৭১ খ্রীষ্টাব্দের মার্চ মাসের ২৬ তারিখে স্বাধীনতা-ঘোষণার অব্যবহিত পূর্বে যে সকল এলাকা লইয়া পূর্ব পাকিস্তান গঠিত ছিল ৪[ এবং সংবিধান (তৃতীয় সংশোধন) আইন, ১৯৭৪-এ অন্তর্ভুক্ত এলাকা বলিয়া উল্লিখিত এলাকা, কিন্তু উক্ত আইনে বহির্ভূত এলাকা বলিয়া উল্লিখিত এলাকা তদ্‌বহির্ভূত; এবং।

 

(খ) যে সকল এলাকা পরবর্তীকালে বাংলাদেশের সীমানাভুক্ত হইতে পারে৷

রাষ্ট্রধর্ম

৫[ ২ক৷ প্রজাতন্ত্রের রাষ্ট্রধর্ম ইসলাম, তবে অন্যান্য ধর্মও প্রজাতন্ত্রে শান্তিতে পালন করা যাইবে৷]

রাষ্ট্রভাষা

৩৷ প্রজাতন্ত্রের রাষ্ট্রভাষা বাংলা৷

জাতীয় সঙ্গীত, পতাকা ও প্রতীক

৪৷ (১) প্রজাতন্ত্রের জাতীয় সঙ্গীত “আমার সোনার বাংলা”র প্রথম দশ চরণ৷

 

(২) প্রজাতন্ত্রের জাতীয় পতাকা হইতেছে সবুজ ক্ষেত্রের উপর স্থাপিত রক্তবর্ণের একটি ভরাট বৃত্ত৷

 

(৩) প্রজাতন্ত্রের জাতীয় প্রতীক হইতেছে উভয় পার্শ্বে ধান্যশীর্ষবেষ্টিত, পানিতে ভাসমান জাতীয় পুষ্প শাপলা, তাহার শীর্ষদেশে পাটগাছের তিনটি পরস্পর-সংযুক্ত পত্র, তাহার উভয় পার্শ্বে দুইটি করিয়া তারকা৷

 

(৪) উপরি-উক্ত দফাসমূহ-সাপেক্ষে জাতীয় সঙ্গীত, পতাকা ও প্রতীক সম্পর্কিত বিধানাবলী আইনের দ্বারা নির্ধারিত হইবে৷

প্রতিকৃতি

৬[ ৪ক৷ (১) রাষ্ট্রপতির প্রতিকৃতি রাষ্ট্রপতি, প্রধানমন্ত্রী ও স্পীকারের কার্যালয় এবং বিদেশে অবস্থিত বাংলাদেশের দূতাবাস ও মিশনসমূহে সংরক্ষণ ও প্রদর্শন করিতে হইবে৷

 

(২) (১) দফার অতিরিক্ত কেবলমাত্র প্রধানমন্ত্রীর প্রতিকৃতি রাষ্ট্রপতি, প্রধানমন্ত্রী ও স্পীকারের কার্যালয় এবং সকল সরকারী ও আধা-সরকারী অফিস, স্বায়ত্তশাসিত প্রতিষ্ঠান, সংবিধিবদ্ধ সরকারী কর্তৃপক্ষের প্রধান ও শাখা কার্যালয়, সরকারী শিক্ষা প্রতিষ্ঠান, বিদেশে অবস্থিত বাংলাদেশের দূতাবাস ও মিশনসমূহে সংরক্ষণ ও প্রদর্শন করিতে হইবে৷]

রাজধানী

৫৷ (১) প্রজাতন্ত্রের রাজধানী ঢাকা৷

 

(২) রাজধানীর সীমানা আইনের দ্বারা নির্ধারিত হইবে৷

নাগরিকত্ব

৭[ ৬৷ (১) বাংলাদেশের নাগরিকত্ব আইনের দ্বারা নির্ধারিত ও নিয়ন্ত্রিত হইবে৷

 

(২) বাংলাদেশের নাগরিকগণ বাংলাদেশী বলিয়া পরিচিত হইবেন৷]

সংবিধানের প্রাধান্য

৭৷ (১) প্রজাতন্ত্রের সকল ক্ষমতার মালিক জনগণ; এবং জনগণের পক্ষে সেই ক্ষমতার প্রয়োগ কেবল এই সংবিধানের অধীন ও কর্তৃত্বে কার্যকর হইবে৷

 

(২) জনগণের অভিপ্রায়ের পরম অভিব্যক্তিরূপে এই সংবিধান প্রজাতন্ত্রের সর্বোচ্চ আইন এবং অন্য কোন আইন যদি এই সংবিধানের সহিত অসমঞ্জস হয়, তাহা হইলে সেই আইনের যতখানি অসামঞ্জস্যপূর্ণ, ততখানি বাতিল হইবে৷

দ্বিতীয় ভাগ

রাষ্ট্র পরিচালনার মূলনীতি

মূলনীতিসমূহ

৮৷ ৮[ (১) সর্বশক্তিমান আল্লাহের উপর পূর্ণ আস্থা ও বিশ্বাস, জাতীয়তাবাদ, গণতন্ত্র এবং সমাজতন্ত্র অর্থাৎ অর্থনৈতিক ও সামাজিক সুবিচার-এই নীতিসমূহ এবং তৎসহ এই নীতিসমূহ হইতে উদ্ভূত এই ভাগে বর্ণিত অন্য সকল নীতি রাষ্ট্র পরিচালনার মূলনীতি বলিয়া পরিগণিত হইবে৷

 

(১ক) সর্বশক্তিমান আল্লাহের উপর পূর্ণ আস্থা ও বিশ্বাসই হইবে যাবতীয় কার্যাবলীর ভিত্তি৷]

 

(২) এই ভাগে বর্ণিত নীতিসমূহ বাংলাদেশ-পরিচালনার মূলসূত্র হইবে, আইন-প্রণয়নকালে রাষ্ট্র তাহা প্রয়োগ করিবেন, এই সংবিধান ও বাংলাদেশের অন্যান্য আইনের ব্যাখ্যাদানের ক্ষেত্রে তাহা নির্দেশক হইবে এবং তাহা রাষ্ট্র ও নাগরিকদের কার্যের ভিত্তি হইবে, তবে এই সকল নীতি আদালতের মাধ্যমে বলবৎযোগ্য হইবে না৷

স্থানীয় শাসন-সংক্রান্ত প্রতিষ্ঠানসমূহের উন্নয়ন

৯[ ৯৷ রাষ্ট্র সংশ্লিষ্ট এলাকার প্রতিনিধিগণ সমন্বয়ে গঠিত স্থানীয় শাসন-সংক্রান্ত প্রতিষ্ঠানসমূহকে উৎসাহ দান করিবেন এবং এই সকল প্রতিষ্ঠানসমূহে কৃষক, শ্রমিক এবং মহিলাদিগকে যথাসম্ভব বিশেষ প্রতিনিধিত্ব দেওয়া হইবে৷

জাতীয় জীবনে মহিলাদের অংশগ্রহণ

১০৷ জাতীয় জীবনের সর্বস্তরে মহিলাদের অংশগ্রহণ নিশ্চিত করিবার ব্যবস্থা গ্রহণ করা হইবে৷]

গণতন্ত্র ও মানবাধিকার

১১৷ প্রজাতন্ত্র হইবে একটি গণতন্ত্র, যেখানে মৌলিক মানবাধিকার ও স্বাধীনতার নিশ্চয়তা থাকিবে, মানবসত্তার মর্যাদা ও মূল্যের প্রতি শ্রদ্ধাবোধ নিশ্চিত হইবে ১০[ * * *] ১১[ এবং প্রশাসনের সকল পর্যায়ে নির্বাচিত প্রতিনিধদের মাধ্যমে জনগণের কার্যকর অংশগ্রহণ নিশ্চিত হইবে]৷

[বিলুপ্ত]

১২৷ ১২[ ধর্মনিরপেক্ষতা ও ধর্মীয় স্বাধীনতা.- The Second Proclamation (Fifteenth Amendment) Order, 1978 (Second Proclamation Order No. IV of 1978) এর 2nd Schedule বলে বিলুপ্ত৷]

মালিকানার নীতি

১৩৷ উৎপাদনযন্ত্র, উৎপাদনব্যবস্থা ও বন্টনপ্রণালীসমূহের মালিক বা নিয়ন্ত্রক হইবেন জনগণ এবং এই উদ্দেশ্যে মালিকানা-ব্যবস্থা নিম্নরূপ হইবে:

 

(ক) রাষ্ট্রীয় মালিকানা, অর্থাৎ অর্থনৈতিক জীবনের প্রধান প্রধান ক্ষেএ লইয়া সুষ্ঠু ও গতিশীল রাষ্ট্রায়ত্ত সরকারী খাত সৃষ্টির মাধ্যমে জনগণের পক্ষে রাষ্ট্রের মালিকানা;

 

(খ) সমবায়ী মালিকানা, অর্থাৎ আইনের দ্বারা নির্ধারিত সীমার মধ্যে সমবায়সমূহের সদস্যদের পক্ষে সমবায়সমূহের মালিকানা; এবং

 

(গ) ব্যক্তিগত মালিকানা, অর্থাৎ আইনের দ্বারা নির্ধারিত সীমার মধ্যে ব্যক্তির মালিকানা৷

কৃষক ও শ্রমিকের মুক্তি

১৪৷ রাষ্ট্রের অন্যতম মৌলিক দায়িত্ব হইবে মেহনতী মানুষকে-কৃষক ও শ্রমিকের-এবং জনগণের অনগ্রসর অংশসমূহকে সকল প্রকার শোষণ হইতে মুক্তি দান করা৷

মৌলিক প্রয়োজনের ব্যবস্থা

১৫৷ রাষ্ট্রের অন্যতম মৌলিক দায়িত্ব হইবে পরিকল্পিত অর্থনৈতিক বিকাশের মাধ্যমে উৎপাদনশক্তির ক্রমবৃদ্ধিসাধন এবং জনগণের জীবনযাত্রার বস্তুগত ও সংস্কৃতিগত মানের দৃঢ় উন্নতিসাধন, যাহাতে নাগরিকদের জন্য নিম্নলিখিত বিষয়সমূহ অর্জন নিশ্চিত করা যায়:

 

(ক) অন্ন, বস্ত্র, আশ্রয়, শিক্ষা ও চিকিৎসহ জীবনধারণের মৌলিক উপকরণের ব্যবস্থা;

 

(খ) কর্মের অধিকার, অর্থাৎ কর্মের গুণ ও পরিমাণ বিবেচনা করিয়া যুক্তিসঙ্গত মজুরীর বিনিময়ে কর্মসংস্থানের নিশ্চয়তার অধিকার;

 

(গ) যুক্তিসঙ্গত বিশ্রাম, বিনোদন ও অবকাশের অধিকার; এবং

 

(ঘ) সামাজিক নিরাপত্তার অধিকার, অর্থাৎ বেকারত্ব, ব্যাধি বা পঙ্গুত্বজনিত কিংবা বৈধব্য, মাতাপিতৃহীনতা বা বার্ধক্যজনিত কিংবা অনুরূপ অন্যান্য পরিস্থিতিজনিত আয়ত্তাতীত কারণে অভাবগ্রস্ত্মতার ক্ষেত্রে সরকারী সাহায্যলাভের অধিকার৷

গ্রামীণ উন্নয়ন ও কৃষি বিপ্লব

১৬৷ নগর ও গ্রামাঞ্চলের জীবন যাত্রার মানের বৈষম্য ক্রমাগতভাবে দূর করিবার উদ্দেশ্যে কৃষিবিপ্লবের বিকাশ, গ্রামাঞ্চলে বৈদ্যুতীকরণের ব্যবস্থা, কুটিরশিল্প ও অন্যান্য শিল্পের বিকাশ এবং শিক্ষা, যোগাযোগ ব্যবস্থা ও জনস্বাস্থ্যের উন্নয়নের মাধ্যমে গ্রামাঞ্চলের আমূল রূপান্তরসাধনের জন্য রাষ্ট্র কার্যকর ব্যবস্থা গ্রহণ করিবেন৷

অবৈতনিক ও বাধ্যতামূলক শিক্ষা

১৭৷ রাষ্ট্র

 

(ক) একই পদ্ধতির গণমুখী ও সার্বজনীন শিক্ষাব্যবস্থা প্রতিষ্ঠার জন্য এবং আইনের দ্বারা নির্ধারিত স্তর পর্যন্ত সকল বালক-বালিকাকে অবৈতনিক ও বাধ্যতামূলক শিক্ষাদানের জন্য;

 

(খ) সমাজের প্রয়োজনের সহিত শিক্ষাকে সঙ্গতিপূর্ণ করিবার জন্য এবং সেই প্রয়োজন সিদ্ধ করিবার উদ্দেশ্যে যথাযথ প্রশিণপ্রাপ্ত ও সদিচ্ছা-প্রণোদিত নাগরিক সৃষ্টির জন্য;

 

(গ) আইনের দ্বারা নির্ধারিত সময়ের মধ্যে নিরক্ষরতা দূর করিবার জন্য;

 

কার্যকর ব্যবস্থা গ্রহণ করিবেন৷

জনস্বাস্থ্য ও নৈতিকতা

১৮৷ (১) জনগণের পুষ্টির স্তর-উন্নয়ন ও জনস্বাস্থ্যের উন্নতিসাধনকে রাষ্ট্র অন্যতম প্রাথমিক কর্তব্য বলিয়া গণ্য করিবেন এবং বিশেষতঃ আরোগ্যের প্রয়োজন কিংবা আইনের দ্বারা নির্দিষ্ট অন্যবিধ প্রয়োজন ব্যতীত মদ্য ও অন্যান্য মাদক পানীয় এবং স্বাস্থ্যহানিকর ভেষজের ব্যবহার নিষিদ্ধকরণের জন্য রাষ্ট্র কার্যকর ব্যবস্থা গ্রহণ করিবেন৷

 

(২) গণিকাবৃত্তি ও জুয়াখেলা নিরোধের জন্য রাষ্ট্র কার্যকর ব্যবস্থা গ্রহণ করিবেন৷

সুযোগের সমতা

১৯৷ (১) সকল নাগরিকের জন্য সুযোগের সমতা নিশ্চিত করিতে রাষ্ট্র সচেষ্ট হইবেন৷

 

(২) মানুষে মানুষে সামাজিক ও অর্থনৈতিক অসাম্য বিলোপ করিবার জন্য, নাগরিকদের মধ্যে সম্পদের সুষম বন্টন নিশ্চিত করিবার জন্য এবং প্রজাতন্ত্রের সর্বত্র অর্থনৈতিক উন্নয়নের সমান স্তর অর্জনের উদ্দেশ্যে সুষম সুযোগ-সুবিধাদান নিশ্চিত করিবার জন্য রাষ্ট্র কার্যকর ব্যবস্থা গ্রহণ করিবেন৷

অধিকার ও কর্তব্য-রূপে কর্ম

২০৷ (১) কর্ম হইতেছে কর্মক্ষম প্রত্যেক নাগরিকের পক্ষে অধিকার, কর্তব্য ও সম্মানের বিষয়, এবং “প্রত্যেকের নিকট হইতে যোগ্যতানুসারে ও প্রত্যেককে কর্মানুযায়ী”-এই নীতির ভিত্তিতে প্রত্যেকে স্বীয় কর্মের জন্য পারিশ্রমিক লাভ করিবেন৷

 

(২) রাষ্ট্র এমন অবস্থা সৃষ্টির চেষ্টা করিবেন, যেখানে সাধারণ নীতি হিসাবে কোন ব্যক্তি অনুপার্জিত আয় ভোগ করিতে সমর্থ হইবেন না এবং যেখানে বুদ্ধিবৃত্তিমূলক ও কায়িক-সকল প্রকার শ্র্রম সৃষ্টিধর্মী প্রয়াসের ও মানবিক ব্যক্তিত্বের পূর্ণতর অভিব্যক্তিতে পরিণত হইবে৷

নাগরিক ও সরকারী কর্মচারীদের কর্তব্য

২১৷ (১) সংবিধান ও আইন মান্য করা, শৃঙ্খলা রক্ষা করা, নাগরিক দায়িত্ব পালন করা এবং জাতীয় সম্পত্তি রক্ষা করা প্রত্যেক নাগরিকের কর্তব্য৷

 

(২) সকল সময়ে জনগণের সেবা করিবার চেষ্টা করা প্রজাতন্ত্রের কর্মে নিযুক্ত প্রত্যেক ব্যক্তির কর্তব্য৷

নির্বাহী বিভাগ হইতে বিচার বিভাগের পৃথকীকরণ

২২৷ রাষ্ট্রের নির্বাহী অঙ্গসমূহ হইতে বিচার বিভাগের পৃথকীকরণ রাষ্ট্র নিশ্চিত করিবেন৷

জাতীয় সংস্কৃতি

২৩৷ রাষ্ট্র জনগণের সাংস্কৃতিক ঐতিহ্য ও উত্তরাধিকার রক্ষণের জন্য ব্যবস্থা গ্রহণ করিবেন এবং জাতীয় ভাষা, সাহিত্য ও শিল্পকলাসমূহের এমন পরিপোষণ ও উন্নয়নের ব্যবস্থা গ্রহণ করিবেন, যাহাতে সর্বস্তরের জনগণ জাতীয় সংস্কৃতির সমৃদ্ধিতে অবদান রাখিবার ও অংশগ্রহণ করিবার সুযোগ লাভ করিতে পারেন৷

জাতীয় স্মৃতিনিদর্শন, প্রভৃতি

২৪৷ বিশেষ শৈল্পিক কিংবা ঐতিহাসিক গুরুত্বসম্পন্ন বা তাৎর্যমণ্ডিত স্মৃতিনিদর্শন, বস্তু বা স্থানসমূহকে বিকৃতি, বিনাশ বা অপসারণ হইতে রক্ষা করিবার জন্য রাষ্ট্র ব্যবস্থা গ্রহণ করিবেন৷

আন্তর্জাতিক শান্তি, নিরাপত্তা ও সংহতির উন্নয়ন

২৫৷ ১৩[ (১)] জাতীয় সার্বভৌমত্ব ও সমতার প্রতি শ্রদ্ধা, অন্যান্য রাষ্ট্রের অভ্যন্তরীণ বিষয়ে হস্তক্ষেপ না করা, আন্তর্জাতিক বিরোধের শান্তিপূর্ণ সমাধান এবং আন্তর্জাতিক আইনের ও জাতিসংঘের সনদে বর্ণিত নীতিসমূহের প্রতি শ্রদ্ধা-এই সকল নীতি হইবে রাষ্ট্রের আন্তর্জাতিক সম্পর্কের ভিত্তি এবং এই সকল নীতির ভিত্তিতে রাষ্ট্র

 

(ক) আন্তর্জাতিক সম্পর্কের ক্ষেত্রে শক্তিপ্রয়োগ পরিহার এবং সাধারণ ও সম্পূর্ণ নিরস্ত্রীকরণের জন্য চেষ্টা করিবেন;

 

(খ) প্রত্যেক জাতির স্বাধীন অভিপ্রায় অনুযায়ী পথ ও পন্থার মাধ্যমে অবাধে নিজস্ব সামাজিক, অর্থনৈতিক ও রাজনৈতিক ব্যবস্থা নির্ধারণ ও গঠনের অধিকার সমর্থন করিবেন; এবং

 

(গ) সাম্রাজ্যবাদ, ঔপনিবেশিকতাবাদ বা বর্ণবৈষম্যবাদের বিরুদ্ধে বিশ্বের সর্বত্র নিপীড়িত জনগণের ন্যায়সঙ্গত সংগ্রামকে সমর্থন করিবেন৷

 

১৪[ (২) রাষ্ট্র ইসলামী সংহতির ভিত্তিতে মুসলিম দেশসমূহের মধ্যে ভ্রাতৃত্ব সম্পর্ক সংহত, সংরক্ষণ এবং জোরদার করিতে সচেষ্ট হইবেন৷]

তৃতীয় ভাগ

মৌলিক অধিকার

Constitution of Bangladesh English

Posted by imomins on March 25, 2013 at 12:00 AM Comments comments (0)

THE CONSTITUTION OF THE PEOPLE’S REPUBLIC OF BANGLADESH

[]

1[ BISMILLAH-AR-RAHMAN-AR-RAHIM

(In the name of Allah, the Beneficient, the Merciful)]

PREAMBLE

We, the people of Bangladesh, having proclaimed our independence on the 26th day of March, 1971 and through 2[ a historic war for national independence], established the independent, sovereign People's Republic of Bangladesh;

3[ Pledging that the high ideals of absolute trust and faith in the Almighty Allah, nationalism, democracy and socialism meaning economic and social justice, which inspired our heroic people to dedicate themselves to, and our brave martyrs to sacrifice their lives in, the war for national independence, shall be the fundamental principles of the Constitution;]

Further pledging that it shall be a fundamental aim of the State to realise through the democratic process a socialist society, free from exploitation a society in which the rule of law, fundamental human rights and freedom, equality and justice, political, economic and social, will be secured for all citizens;

Affirming that it is our sacred duty to safeguard, protect and defend this Constitution and to maintain its supremacy as the embodiment of the will of the people of Bangladesh so that we may prosper in freedom and may make our full contribution towards international peace and co operation in keeping with the progressive aspirations of mankind;

In our Constituent Assembly, this eighteenth day of Kartick, 1379 B.S., corresponding to the fourth day of November, 1972 A.D., do hereby adopt, enact and give to ourselves this Constitution.

PART I

 

THE REPUBLIC

 

The Republic

1. Bangladesh is a unitary, independent, sovereign Republic to be known as the People's Republic of Bangladesh.

The territory of the Republic

2. The territory of the Republic shall comprise –

 

 

 

(a) the territories which immediately before the Proclamation of Independence on the 26th day of March, 1971 constituted East Pakistan 4[ and the territories referred to as included territories in the Constitution (Third Amendment) Act, 1974, but excluding the territories referred to as excluded territories in that Act; and]

 

 

 

(b) such other territories as may become included in Bangladesh.

The state religion

5[ 2A. The state religion of the Republic is Islam, but other religions may be practised in peace and harmony in the Republic.]

The state language

3. The state language of the Republic is 6[ Bangla].

National anthem, flag and emblem

4. (1) The national anthem of the Republic is the first ten lines of “Amar Sonar Bangla”.

 

(2) The national flag of the Republic shall consist of a circle, coloured red throughout its area, resting on a green background.

 

 

 

(3) The national emblem of the Republic is the national flower Shapla (nymphaea nouchali) resting on water, having on each side an ear of paddy and being surmounted by three connected leaves of jute with two stars on each side of the leaves.

 

 

 

(4) Subject to the foregoing clauses, provisions relating to the national anthem, flag and emblem shall be made by law.

Portrait

7[ 4A. (1) Portrait of the President shall be preserved and displayed at the offices of the President, Prime Minister and Speaker, and all embassies and missions of Bangladesh abroad.

 

 

 

(2) In addition to clause (1), portrait, of only the Prime Minister, shall be preserved and displayed at the offices of the President and the Speaker, and in head and branch offices of all Government and semi-Government offices, autonomous bodies, statutory public authorities, Government educational institutions, embassies and missions of Bangladesh abroad.]

The capital

5. (1) The capital of the Republic is 8[ Dhaka].

 

 

 

(2) The boundaries of the capital shall be determined by law.

Citizenship

9[ 6. (1) The citizenship of Bangladesh shall be determined and regulated by law.

 

 

 

(2) The citizens of Bangladesh shall be known as Bangladeshis.]

Supremacy of the Constitution

7. (1) All powers in the Republic belong to the people, and their exercise on behalf of the people shall be effected only under, and by the authority of, this Constitution.

 

 

 

(2) This Constitution is, as the solemn expression of the will of the people, the supreme law of the Republic, and if any other law is inconsistent with this Constitution that other law shall, to the extent of the inconsistency, be void.

PART II

 

FUNDAMENTAL PRINCIPLES OF STATE POLICY

 

Fundamental principles

8. 10[ (1) The principles of absolute trust and faith in the Almighty Allah, nationalism, democracy and socialism meaning economic and social justice, together with the principles derived from them as set out in this Part, shall constitute the fundamental principles of state policy.

 

 

 

(1A) Absolute trust and faith in the Almighty Allah shall be the basis of all actions.]

 

 

 

(2) The principles set out in this Part shall be fundamental to the governance of Bangladesh, shall be applied by the State in the making of laws, shall be a guide to the interpretation of the Constitution and of the other laws of Bangladesh, and shall form the basis of the work of the State and of its citizens, but shall not be judicially enforceable.

Promotion of local Government institutions

11[ 9. The State shall encourage local Government institutions composed of representatives of the areas concerned and in such institutions special representation shall be given, as far as possible, to peasants, workers and women.

Participation of women in national life

10. Steps shall be taken to ensure participation of women in all spheres of national life.]

Democracy and human rights

11. The Republic shall be a democracy in which fundamental human rights and freedoms and respect for the dignity and worth of the human person shall be guaranteed 12[ * * *] 13[ , and in which effective participation by the

 

people through their elected representatives in administration at all levels shall be ensured].

[Omitted]

12. [Secularism and freedom of religion.- omitted by Article 5 of the Proclamations (Amendment) Order, 1977 (Proclamations Order No. I of 1977).]

Principles of ownership

13. The people shall own or control the instruments and means of production and distribution, and with this end in view ownership shall assume the following forms –

 

 

 

(a) state ownership, that is ownership by the State on behalf of the people through the creation of an efficient and dynamic nationalised public sector embracing the key sectors of the economy;

 

 

 

(b) co operative ownership, that is ownership by co operatives on behalf of their members within such limits as may be prescribed by law; and

 

 

 

(c) private ownership, that is ownership by individuals within such limits as may be prescribed by law.

Emancipation of peasants and workers

14. It shall be a fundamental responsibility of the State to emancipate the toiling masses the peasants and workers and backward sections of the people from all forms of exploitation.

Provision of basic necessities

15. It shall be a fundamental responsibility of the State to attain, through planned economic growth, a constant increase of productive forces and a steady improvement in the material and cultural standard of living of the people, with a view to securing to its citizens –

 

 

 

(a) the provision of the basic necessities of life, including food, clothing, shelter, education and medical care;

 

 

 

(b) the right to work, that is the right to guaranteed employment at a reasonable wage having regard to the quantity and quality of work;

 

 

 

(c) the right to reasonable rest, recreation and leisure; and

 

 

 

(d) the right to social security, that is to say, to public assistance in cases of undeserved want arising from unemployment, illness or disablement, or suffered by widows or orphans or in old age, or in other such cases.

Rural development and agricultural revolution

16. The State shall adopt effective measures to bring about a radical transformation in the rural areas through the promotion of an agricultural revolution, the provision of rural electrification, the development of cottage and other industries, and the improvement of education, communications and public health, in those areas, so as progressively to remove the disparity in the standards of living between the urban and the rural areas.

Free and compulsory education

17. The State shall adopt effective measures for the purpose of –

 

(a) establishing a uniform, mass oriented and universal system of education and extending free and compulsory education to all children to such stage as may be determined by law;

 

(b) relating education to the needs of society and producing properly trained and motivated citizens to serve those needs;

 

(c) removing illiteracy within such time as may be determined by law.

Public health and morality

18. (1) The State shall regard the raising of the level of nutrition and the improvement of public health as among its primary duties, and in particular shall adopt effective measures to prevent the consumption, except for medical purposes or for such other purposes as may be prescribed by law, of alcoholic and other intoxicating drinks and of drugs which are injurious to health.

 

 

 

(2) The State shall adopt effective measures to prevent prostitution and gambling.

Equality of opportunity

19. (1) The State shall endeavour to ensure equality of opportunity to all citizens.

 

 

(2) The State shall adopt effective measures to remove social and economic inequality between man and man and to ensure the equitable distribution of wealth among citizens, and of opportunities in order to attain a uniform level of economic development throughout the Republic.

Work as a right and duty

20. (1) Work is a right, a duty and a matter of honour for every citizen who is capable of working, and everyone shall be paid for his work on the basis of the principle “from each according to his abilities, to each according to his work”.

 

 

 

(2) The State shall endeavour to create conditions in which, as a general principle, persons shall not be able to enjoy unearned incomes, and in which human labour in every form, intellectual and physical, shall become a fuller expression of creative endeavour and of the human personality.

Duties of citizens and of public servants

21. (1) It is the duty of every citizen to observe the Constitution and the laws, to maintain discipline, to perform public duties and to protect public property.

 

 

 

(2) Every person in the service of the Republic has a duty to strive at all times to serve the people.

Separation of Judiciary from the executive

22. The State shall ensure the separation of the judiciary from the executive organs of the State.

National culture

23. The State shall adopt measures to conserve the cultural traditions and heritage of the people, and so to foster and improve the national language, literature and the arts that all sections of the people are afforded the opportunity to contribute towards and to participate in the enrichment of the national culture.

National monuments, etc

24. The State shall adopt measures for the protection against disfigurement, damage or removal of all monuments, objects or places of special artistic or historic importance or interest.

Promotion of international peace, security and solidarity

25. 14[ (1)] The State shall base its international relations on the principles of respect for national sovereignty and equality, non interference in the internal affairs of other countries, peaceful settlement of international disputes, and respect for

 

international law and the principles enunciated in the United Nations Charter, and on the basis of those principles shall –

 

 

 

(a) strive for the renunciation of the use of force in international relations and for general and complete disarmament;

 

 

 

(b) uphold the right of every people freely to determine and build up its own social, economic and political system by ways and means of its own free choice; and

 

 

 

(c) support oppressed peoples throughout the world waging a just struggle against imperialism, colonialism or racialism.

 

 

 

15[ (2) The State shall endeavour to consolidate, preserve and strengthen fraternal relations among Muslim countries based on Islamic solidarity.]

PART III

 

FUNDAMENTAL RIGHTS

 

Laws inconsistent with fundamental rights to be void

26. (1) All existing law inconsistent with the provisions of this Part shall, to the extent of such inconsistency, become void on the commencement of this Constitution.

 

 

 

(2) The State shall not make any law inconsistent with any provisions of this Part, and any law so made shall, to the extent of such inconsistency, be void.

 

 

 

16[ (3) Nothing in this article shall apply to any amendment of this Constitution made under article 142.]

Equality before law

27. All citizens are equal before law and are entitled to equal protection of law.

Discrimination on grounds of religion, etc

28. (1) The State shall not discriminate against any citizen on grounds only of religion, race, caste, sex or place of birth.

 

 

(2) Women shall have equal rights with men in all spheres of the State and of public life.

 

 

 

(3) No citizen shall, on grounds only of religion, race, caste, sex or place of birth be subjected to any disability, liability, restriction or condition with regard to access to any place of public entertainment or resort, or admission to any educational institution.

 

 

 

(4) Nothing in this article shall prevent the State from making special provision in favour of women or children or for the advancement of any backward section of citizens.

Equality of opportunity in public employment

29. (1) There shall be equality of opportunity for all citizens in respect of employment or office in the service of the Republic.

 

(2) No citizen shall, on grounds only of religion, race, caste, sex or place of birth, be ineligible for, or discriminated against in respect of, any employment or office in the service of the Republic.

 

 

 

(3) Nothing in this article shall prevent the State from –

 

 

 

(a) making special provision in favour of any backward section of citizens for the purpose of securing their adequate representation in the service of the Republic;

 

 

 

(b) giving effect to any law which makes provision for reserving appointments relating to any religious or denominational institution to persons of that religion or denomination;

 

 

 

(c) reserving for members of one sex any class of employment or office on the ground that it is considered by its nature to be unsuited to members of the opposite sex.

Prohibition of foreign titles, etc

17[ 30. No citizen shall, without the prior approval of the President, accept any title, honour, award or decoration from any foreign state.]

Right to protection of law

31. To enjoy the protection of the law, and to be treated in accordance with law, and only in accordance with law, is the inalienable right of every citizen, wherever he may be, and of every other person for the time being within Bangladesh, and in particular no action detrimental to the life, liberty, body, reputation or property of any person shall be taken except in accordance with law.

Protection of right to life and personal liberty

32. No person shall be deprived of life or personal liberty save in accordance with law.

Safeguards as to arrest and detention

18[ 33. (1) No person who is arrested shall be detained in custody without being informed, as soon as may be, of the grounds for such arrest, nor shall he be denied the right to consult and be defended by a legal practitioner of his choice.

 

(2) Every person who is arrested and detained in custody shall be produced before the nearest magistrate within a period of twenty four hours of such arrest, excluding the time necessary for the journey from the place of arrest to the Court of the magistrate, and no such person shall be detained in custody beyond the said period without the authority of a magistrate.

 

 

 

(3) Nothing in clauses (1) and (2) shall apply to any person–

 

 

 

(a) who for the time being is an enemy alien; or

 

 

 

(b) who is arrested or detained under any law providing for preventive detention.

 

 

 

(4) No law providing for preventive detention shall authorise the detention of a person for a period exceeding six months unless an Advisory Board consisting of three persons, of whom two shall be persons who are, or have been, or are qualified to be appointed as, Judges of the Supreme Court and the other shall be a person who is a senior officer in the service of the Republic, has, after affording him an opportunity of being heard in person, reported before the expiration of the said period of six months that there is, in its opinion, sufficient cause for such detention.

 

 

 

(5) When any person is detained in pursuance of an order made under any law providing for preventive detention, the authority making the order shall, as soon as may be, communicate to such person the grounds on which the order has been made, and shall afford him the earliest opportunity of making a representation against the order:

 

 

 

Provided that the authority making any such order may refuse to disclose facts which such authority considers to be against the public interest to disclose.

 

 

 

(6) Parliament may by law prescribe the procedure to be followed by an Advisory Board in an inquiry under clause (4).]

Prohibition of forced labour

34. (1) All forms of forced labour are prohibited and any contravention of this provision shall be an offence punishable in accordance with law.

 

 

 

(2) Nothing in this article shall apply to compulsory labour–

 

 

 

(a) by persons undergoing lawful punishment for a criminal offence; or

 

 

 

(b) required by any law for public purposes.

Protection in respect of trial and punishment

35. (1) No person shall be convicted of any offence except for violation of a law in force at the time of the commission of the act charged as an offence, nor be subjected to a penalty greater than, or different from, that which might have been inflicted under the law in force at the time of the commission of the offence.

 

 

 

(2) No person shall be prosecuted and punished for the same offence more than once.

 

 

 

(3) Every person accused of a criminal offence shall have the right to a speedy and public trial by an independent and impartial Court or tribunal established by law.

 

 

 

(4) No person accused of any offence shall be compelled to be a witness against himself.

 

 

 

(5) No person shall be subjected to torture or to cruel, inhuman, or degrading punishment or treatment.

 

 

 

(6) Nothing in clause (3) or clause (5) shall affect the operation of any existing law which prescribes any punishment or procedure for trial.

Freedom of movement

36. Subject to any reasonable restrictions imposed by law in the public interest, every citizen shall have the right to move freely throughout Bangladesh, to reside and settle in any place therein and to leave and re-enter Bangladesh.

Freedom of assembly

37. Every citizen shall have the right to assemble and to participate in public meetings and processions peacefully and without arms, subject to any reasonable restrictions imposed by law in the interests of public order or public health.

Freedom of association

38. Every citizen shall have the right to form associations or unions, subject to any reasonable restrictions imposed by law in the interests of morality or public order:

 

 

 

19[ * * *]

Freedom of thought and conscience, and of speech

39. (1) Freedom of thought and conscience is guaranteed.

 

 

 

(2) Subject to any reasonable restrictions imposed by law in the interests of the security of the State, friendly relations with foreign states, public order, decency or morality, or in relation to contempt of court, defamation or incitement to an offence–

 

 

 

(a) the right of every citizen to freedom of speech and expression; and

 

 

 

(b) freedom of the press,

 

 

 

are guaranteed.

Freedom of profession or occupation

40. Subject to any restrictions imposed by law, every citizen possessing such qualifications, if any, as may be prescribed by law in relation to his profession, occupation, trade or business shall have the right to enter upon any lawful profession or occupation, and to conduct any lawful trade or business.

Freedom of religion

41. (1) Subject to law, public order and morality –

 

 

 

 

 

(a) every citizen has the right to profess, practise or propagate any religion;

 

 

 

(b) every religious community or denomination has the right to establish, maintain and manage its religious institutions.

 

 

 

(2) No person attending any educational institution shall be required to receive religious instruction, or to take part in or to attend any religious ceremony or worship, if that instruction, ceremony or worship relates to a religion other than his own.

Rights to property

42. (1) Subject to any restrictions imposed by law, every citizen shall have the right to acquire, hold, transfer or otherwise dispose of property, and no property shall be compulsorily acquired, nationalised or requisitioned save by authority of law.

 

 

 

20[ (2) A law made under clause (1) shall provide for the acquisition, nationalisation or requisition with compensation and shall either fix the amount of compensation or specify the principles on which, and the manner in which, the compensation is to be assessed and paid; but no such law shall be called in question in any court on the ground that any provision in respect of such compensation is not adequate.

 

 

 

(3) Nothing in this article shall affect the operation of any law made before the commencement of the Proclamations (Amendment) Order, 1977 (Proclamations Order No. I of 1977), in so far as it relates to the acquisition, nationalisation or requisition of any property without compensation.]

Protection of home and correspondence

43. Every citizen shall have the right, subject to any reasonable restrictions imposed by law in the interests of the security of the State, public order, public morality or public health –

 

 

 

(a) to be secured in his home against entry, search and seizure; and

 

 

 

(b) to the privacy of his correspondence and other means of communication.

Enforcement of fundamental rights

21[ 44. (1) The right to move the 22[ High Court Division] in accordance with 23[ Clause (1)] of article 102, for the enforcement of the rights conferred by this Part is guaranteed.

 

(2) Without prejudice to the powers of the 24[ High Court Division] under article 102, Parliament may by law empower any other court, within the local limits of its jurisdiction, to exercise all or any of those powers.]

Modification of rights in respect of disciplinary law

45. Nothing in this Part shall apply to any provision of a disciplinary law relating to members of a disciplined force, being a provision limited to the purpose of ensuring the proper discharge of their duties or the maintenance of discipline in that force.

Power to provide indemnity

46. Notwithstanding anything in the foregoing provisions of this Part, Parliament may by law make provision for indemnifying any person in the service of the Republic or any other person in respect of any act done by him in connection with the national liberation struggle or the maintenance or restoration of order in any area in Bangladesh or validate any sentence passed, punishment inflicted, forfeiture ordered, or other act done in any such area.

Saving for certain laws

47. (1) No law providing for any of the following matters shall be deemed to be void on the ground that it is inconsistent with, or takes away or abridges, any of the rights guaranteed by this Part –

 

 

 

(a) the compulsory acquisition, nationalisation or requisition of any property, or the control or management thereof whether temporarily or permanently;

 

 

 

(b) the compulsory amalgamation of bodies carrying on commercial or other undertakings;

 

 

 

(c) the extinction, modification, restriction or regulation of rights of directors, managers, agents and officers of any such bodies, or of the voting rights of persons owning shares or stock (in whatever form) therein;

 

(d) the extinction, modification, restriction or regulation of rights to search for or win minerals or mineral oil;

 

 

 

(e) the carrying on by the Government or by a corporation owned, controlled or managed by the Government, of any trade, business, industry or service to the exclusion, complete or partial, of other persons ; or

 

 

 

(f) the extinction, modification, restriction or regulation of any right to property, any right in respect of profession, occupation, trade or business or the rights of employers or employees in any statutory public authority or in any commercial or industrial undertaking ;

 

 

 

if Parliament in such law (including, in the case of existing law, by amendment) expressly declares that such provision is made to give effect to any of the fundamental principles of state policy set out in Part II of this Constitution.

 

 

 

(2) Notwithstanding anything contained in this Constitution the laws specified in the First Schedule (including any amendment of any such law) shall continue to have full force and effect, and no provision of any such law, nor anything done or omitted to be done under the authority of such law, shall be deemed void or unlawful on the ground of inconsistency with, or repugnance to, any provision of this Constitution:

 

 

 

25[ Provided that nothing in this article shall prevent amendment, modification or repeal of any such law.]

 

 

 

26[ (3) Notwithstanding anything contained in this Constitution, no law nor any provision thereof providing for detention, prosecution or punishment of any person, who is a member of any armed or defence or auxiliary forces or who is a prisoner of war, for genocide, crimes against humanity or war crimes and other crimes under international law shall be

 

deemed void or unlawful, or ever to have become void or unlawful, on the ground that such law or provision of any such law is inconsistent with, or repugnant to, any of the provisions of this Constitution.]

Inapplicability of certain articles

27[ 47A. (1) The rights guaranteed under article 31, clauses (1) and (3) of article 35 and article 44 shall not apply to any person to whom a law specified in clause (3) of article 47 applies.

 

 

 

(2) Notwithstanding anything contained in this Constitution, no person to whom a law specified in clause (3) of article 47 applies shall have the right to move the Supreme Court for any of the remedies under this Constitution.]

PART IV

 

THE EXECUTIVE

 

28 CHAPTER I

 

THE PRESIDENT

The President

48. (1) There shall be a President of Bangladesh who shall be elected by members of Parliament in accordance with law.

 

 

 

(2) The President shall, as Head of State, take precedence over all other persons in the State, and shall exercise the powers and perform the duties conferred and imposed on him by this Constitution and by any other law.

 

 

 

(3) In the exercise of all his functions, save only that of appointing the Prime Minister pursuant to clause (3) of article 56 and the Chief Justice pursuant to clause (1) of article 95, the President shall act in accordance with the advice of the Prime Minister:

 

 

 

Provided that the question whether any, and if so what, advice has been tendered by the Prime Minister to the President shall not be enquired into in any court.

 

 

 

(4) A person shall not be qualified for election as President if he –

 

 

 

(a) is less than thirty five years of age; or

 

 

 

(b) is not qualified for election as a member of Parliament; or

 

 

 

(c) has been removed from the office of President by impeachment under this Constitution.

 

 

 

(5) The Prime Minister shall keep the President informed on matters of domestic and foreign policy, and submit for the consideration of the Cabinet any matter which the President may request him to refer to it.

Prerogative of mercy

49. The President shall have power to grant pardons, reprieves and respites and to remit, suspend or commute any sentence passed by any court, tribunal or other authority.

Term of office of President

50. (1) Subject to the provisions of this Constitution, the President shall hold office for a term of five years form the date on which he enters upon his office:

 

 

 

Provided that notwithstanding the expiration of his term the President shall continue to hold office until his successor enters upon office.

 

 

 

(2) No person shall hold office as President for more than two terms, whether or not the terms are consecutive.

 

 

 

(3) The President may resign his office by writing under his hand addressed to the Speaker.

 

 

 

(4) The President during his term of office shall not be qualified for election as a member of Parliament, and if a member of Parliament is elected as President he shall vacate his seat in Parliament on the day on which he enters upon his office as President.

President's immunity

51. (1) Without prejudice to the provisions of article 52, the President shall not be answerable in any court for anything done or omitted by him in the exercise or purported exercise of the functions of his office, but this clause shall not prejudice the right of any person to take proceedings against the Government.

 

 

 

(2) During his term of office no criminal proceedings whatsoever shall be instituted or continued against the President in, and no process for his arrest or imprisonment shall issue from, any court.

Impeachment of the President

52. (1) The President may be impeached on a charge of violating this Constitution or of grave misconduct, preferred by a notice of motion signed by a majority of the total number of members of Parliament and delivered to the Speaker, setting

 

out the particulars of the charge, and the motion shall not be debated earlier than fourteen nor later than thirty days after the notice is so delivered; and the Speaker shall forthwith summon Parliament if it is not in session.

 

 

 

(2) The conduct of the President may be referred by Parliament to any court, tribunal or body appointed or designated by Parliament for the investigation of charge under this article.

 

 

 

(3) The President shall have the right to appear and to be represented during the consideration of the charge.

 

 

 

(4) If after the consideration of the charge a resolution is passed by Parliament by the votes of not less than two thirds of the total number of members declaring that the charge has been substantiated, the President shall vacate his office on the date on which the resolution is passed.

 

 

 

(5) Where the Speaker is exercising the functions of the President under article 54 the provisions of this article shall apply subject to the modifications that the reference to the Speaker in clause (1) shall be construed as a reference to the Deputy Speaker, and that the reference in clause (4) to the vacation by the President of his office shall be construed as a reference to the vacation by the Speaker of his office as Speaker; and on the passing of a resolution such as is referred to in clause (4) the Speaker shall cease to exercise the functions of President.

Removal of President on ground of incapacity

53. (1) The President may be removed from office on the ground of physical or mental incapacity on a motion of which notice, signed by a majority of the total number of members of Parliament, is delivered to the Speaker, setting out particulars of the alleged incapacity.

 

 

 

(2) On receipt of the notice the Speaker shall forthwith summon Parliament if it is not in session and shall call for a resolution constituting a medical board (hereinafter in this article called “the Board”), and upon the necessary motion being made and carried shall forthwith cause a copy of the

 

notice to be transmitted to the President together with a request signed by the Speaker that the President submit himself within a period of ten days from the date of the request to an examination by the Board.

 

 

 

(3) The motion for removal shall not be put to the vote earlier than fourteen nor later than thirty days after notice of the motion is delivered to the Speaker, and if it is again necessary to summon Parliament in order to enable the motion to be made within that period, the Speaker shall summon Parliament.

 

 

(4) The President shall have the right to appear and to be represented during the consideration of the motion.

 

 

 

(5) If the President has not submitted himself to an examination by the Board before the motion is made in Parliament, the motion may be put to the vote, and if it is passed by the votes of not less than two thirds of the total number of members of Parliament, the President shall vacate his office on the date on which the motion is passed.

 

 

 

(6) If before the motion for removal is made in Parliament, the President has submitted himself to an examination by the Board, the motion shall not be put to the vote until the Board has been given an opportunity of reporting its opinion to Parliament.

 

 

 

(7) If after consideration by Parliament of the motion and of the report of the Board (which shall be submitted within seven days of the examination held pursuant to clause (2) and if not so submitted shall be dispensed with) the motion is passed by the votes of not less than two thirds of the total number of members of Parliament, the President shall vacate his office on the date on which the resolution is passed.

Speaker to act as President during absence, etc

54. If a vacancy occurs in the office of President or if the President is unable to discharge the functions of his office on account of absence, illness or any other cause the Speaker shall discharge those functions until a President is elected or until the President resumes the functions of his office, as the case may be.

CHAPTER II

 

THE PRIME MINISTER AND THE CABINET

The Cabinet

55. (1) There shall be a Cabinet for Bangladesh having the Prime Minister at its head and comprising also such other Ministers as the Prime Minister may from time to time designate.

 

 

 

(2) The executive power of the Republic shall, in accordance with this Constitution, be exercised by or on the authority of the Prime Minister.

 

 

 

(3) The Cabinet shall be collectively responsible to Parliament.

 

 

 

(4) All executive actions of the Government shall be expressed to be taken in the name of the President.

 

 

 

(5) The President shall by rules specify the manner in which orders and other instruments made in his name shall be attested or authenticated, and the validity of any order or instrument so attested or authenticated shall not be questioned in any court on the ground that it was not duly made or executed.

 

 

 

(6) The President shall make rules for the allocation and transaction of the business of the Government.

Ministers

56. (1) There shall be a Prime Minister, and such other Ministers, Ministers of State and Deputy Ministers as may be determined by the Prime Minister.

 

 

 

(2) The appointments of the Prime Minister and other Ministers and of the Ministers of State and Deputy Ministers, shall be made by the President:

 

 

 

Provided that not less than nine tenths of their number shall be appointed from among members of Parliament and not more than one tenth of their number may be chosen from among persons qualified for election as members of Parliament.

 

 

 

(3) The President shall appoint as Prime Minister the member of Parliament who appears to him to command the support of the majority of the members of Parliament.

 

(4) If occasion arises for making any appointment under clause (2) or clause (3) between a dissolution of Parliament and the next following general election of members of Parliament, the persons who were such members immediately before the dissolution shall be regarded for the purpose of this clause as continuing to be such members.

Tenure of office of Prime Minister

57. (1) The office of the Prime Minister shall become vacant–

 

 

 

(a) if he resigns from office at any time by placing his resignation in the hands of the President; or

 

 

 

(b) if he ceases to be a member of Parliament.

 

 

 

(2) If the Prime Minister ceases to retain the support of a majority of the members of Parliament, he shall either resign his office or advise the President in writing to dissolve Parliament, and if he so advises the President shall, if he is satisfied that no other member of Parliament commands the support of the majority of the members of Parliament, dissolve Parliament accordingly.

 

 

 

(3) Nothing in this article shall disqualify Prime Minister for holding office until his successor has entered upon office.

Tenure of office of other Ministers

58. (1) The office of a Minister other than the Prime Minister shall become vacant –

 

 

 

(a) if he resigns from office by placing his resignation in the hands of the Prime Minister for submission to the President;

 

 

 

(b) if he ceases to be a member of Parliament, but this shall not be applicable to a Minister chosen under the proviso to article 56(2);

 

 

 

(c) if the President, pursuant to the provisions of clause (2), so directs; or

 

 

 

(d) as provided in clause (4).

 

(2) The Prime Minister may at any time request a Minister to resign, and if such Minister fails to comply with the request, may advise the President to terminate the appointment of such Minister.

 

 

 

(3) Nothing in sub clauses (a), (b) and (d) of clause (1) shall disqualify a Minister for holding office during any period in which Parliament stands dissolved.

 

 

 

(4) If the Prime Minister resigns from or ceases to hold office each of the other Ministers shall be deemed also to have resigned from office but shall, subject to the provisions of this Chapter, continue to hold office until his successor has entered upon office.

 

 

 

(5) In this article “Minister” includes Minister of State and Deputy Minister.

Application of Chapter

29[ 58A. Nothing in this Chapter, except the provisions of article 55(4), (5) and (6) shall apply during the period in which Parliament is dissolved or stands dissolved:

 

 

 

Provided that, notwithstanding anything contained in Chapter IIA, where the President summons Parliament that has been dissolved to meet under article 72(4), this Chapter shall apply.]

CHAPTER IIA

 

NON PARTY CARE TAKER GOVERNMENT

The Non Party Care-taker Government

58B. (1) There shall be a Non Party Care taker Government during the period from the date on which the Chief Adviser of such government enters upon office after Parliament is dissolved or stands dissolved by reason of expiration of its term till the date on which a new Prime Minister enters upon his office after the constitution of Parliament. (2) The Non Party Care taker Government shall be collectively responsible to the President.

 

 

 

(3) The executive power of the Republic shall, during the period mentioned in clause (1), be exercised, subject to the provisions of article 58D(1), in accordance with this Constitution, by or on the authority of the Chief Adviser and shall be exercised by him in accordance with the advice of the Non Party Care taker Government.

 

 

 

(4) The provisions of article 55(4), (5) and (6) shall (with the necessary adaptations) apply to similar matters during the period mentioned in clause (1).

Composition of the Non Party Care taker Government, appointment of Advisers, etc

58C. (1) The Non Party Care taker Government shall consist of the Chief Adviser at its head and not more than ten other Advisers, all of whom shall be appointed by the President.

 

 

 

(2) The Chief Adviser and other Advisers shall be appointed within fifteen days after Parliament is dissolved or stands dissolved, and during the period between the date on which Parliament is dissolved or stands dissolved and the date on which the Chief Adviser is appointed, the Prime Minister and his cabinet who were in office immediately before Parliament was dissolved or stood dissolved shall continue to hold office as such.

 

 

 

(3) The President shall appoint as Chief Adviser the person who among the retired Chief Justices of Bangladesh retired last and who is qualified to be appointed as an Adviser under this Article:

 

 

 

Provided that if such retired Chief Justice is not available or is not willing to hold the office of Chief Adviser, the President shall appoint as Chief Adviser the person who among the retired Chief Justices of Bangladesh retired next before the last retired Chief Justice.

 

(4) If no retired Chief Justice is available or willing to hold the office of Chief Adviser, the President shall appoint as Chief Adviser the person who among the retired Judges of the Appellate Division retired last and who is qualified to be appointed as an Adviser under this article:

 

 

 

Provided that if such retired Judge is not available or is not willing to hold the office of Chief Adviser, the President shall appoint as Chief Adviser the person who among the retired Judges of the Appellate Division retired next before the last such retired Judge.

 

 

 

(5) If no retired Judge of the Appellate Division is available or willing to hold the office of Chief Adviser, the President shall, after consultation, as far as practicable, with the major political parties, appoint the Chief Adviser from among citizens of Bangladesh who are qualified to be appointed as Advisers under this article.

 

 

 

(6) Notwithstanding anything contained in this Chapter, if the provisions of clauses (3), (4) and (5) cannot be given effect to, the President shall assume the functions of the Chief Adviser of the Non Party Care taker Government in addition to his own functions under this Constitution.

 

 

 

(7) The President shall appoint Advisers from among the persons who are –

 

 

 

(a) qualified for election as members of Parliament;

 

 

 

(b) not members of any political party or of any organisation associated with or affiliated to any political party;

 

 

 

(c) not, and have agreed in writing not to be, candidates for the ensuing election of members of Parliament;

 

 

 

(d) not over seventy two years of age.

 

 

 

(8) The Advisers shall be appointed by the President on the advice of the Chief Adviser.

 

(9) The Chief Adviser or an Adviser may resign his office by writing under his hand addressed to the President.

 

 

 

(10) The Chief Adviser or an Adviser shall cease to be Chief Adviser or Adviser if he is disqualified to be appointed as such under this article.

 

 

 

(11) The Chief Adviser shall have the status, and shall be entitled to the remuneration and privileges, of a Prime Minister, and an Adviser shall have the status, and shall be entitled to the remuneration and privileges, of a Minister.

 

 

 

(12) The Non Party Care taker Government shall stand dissolved on the date on which the Prime Minister enters upon his office after the constitution of new Parliament.

Functions of Non-Party Care taker Government

58D. (1) The Non Party Care taker Government shall discharge its functions as an interim government and shall carry on the routine functions of such government with the aid and assistance of persons in the services of the Republic; and, except in the case of necessity for the discharge of such functions it shall not make any policy decision.

 

 

 

(2) The Non Party Care taker Government shall give to the Election Commission all possible aid and assistance that may be required for holding the general election of members of Parliament peacefully, fairly and impartially.

Certain provisions of the Constitution to remain ineffective

58E. Notwithstanding anything contained in articles 48(3), 141A(1) and 141C(1) of the Constitution, during the period the Non Party Care taker Government is functioning, provisions in the Constitution requiring the President to act on the ad


Rss_feed