Wednesday, June 10, 2009

Is it possible to stop the clientside validation of an entire page?

Que. Is it possible to stop the clientside validation of an entire page?
Ans. Set Page.Validate = false;

Why we use Autogenerated columns?

Que. What property within the asp:gridview control is changed to bind columns manually?
Ans. Autogenerated columns is set to false

What method is used to explicitly kill a user's session?

Que. What method is used to explicitly kill a user's session?
Ans. Session.Abandon()

Is XML a case-sensitive markup language?

Que. Is XML a case-sensitive markup language?
Ans. Yes.

What is the base class of all web forms?

Dev Palmistry

Que. What is the base class of all web forms?
Ans. System.Web.UI.Page

What is managed data?

Que. What is managed data?
Ans. The data for which the memory management is taken care by .Net runtime’s garbage collector, and this includes tasks for allocation de-allocation.

What are the new features in .NET 2.0?

Que. What are the new features in .NET 2.0?
Ans. Plenty of new controls,
Generics,
anonymous methods,
partial classes,
iterators,
property visibility (separate visibility for get and set) and static classes.

Can we run ASP.NET 1.1 application and ASP.NET 2.0 application on the same computer?

Que. Can we run ASP.NET 1.1 application and ASP.NET 2.0 application on the same computer?
Ans. Yes, though changes in the IIS in the properties for the site have to be made during deployment of each.

Is String a Reference Type or Value Type in .NET?

Que. Is String a Reference Type or Value Type in .NET?
Ans. String is a Reference Type object.

Are MSIL and CIL the same thing?

Dev Palmistry

Que. Are MSIL and CIL the same thing?
Ans. Yes, CIL is the new name for MSIL.

How to Describe Project !!

PROJECT SUMMARY

1. IDLDPL (Indian Digital Life Style Distributors Pvt. Ltd.)
(Current Running Project)

Employer: Arete Consultants pvt ltd.

Profile: Software Developer

Duration: Sep ’08 to till date

Responsibilities: Involved in coding, Writing Stored Procedures, Views, Database Developing.

My Modules: Master, Stock Transfer, Stock Return and Other. And Whole User Part.

Environment: Windows XP SP2, Visual Studio 2005 Dot Net Framework: 2.0

DataBase: Microsoft SQL Server 2000.

Team Members: 5
Role: Design and Coding with Database.

Tools: C#.NET, Java Script, Ajax.

Project Description:

IDLDPL systems are fully integrated solutions, developed on 3 tier architecture. They provide a backbone foundation system that provides most of the day-to-day business transactions. They are designed to deliver a seamless integration of information and knowledge. These systems are very powerful tools that can provide significant benefit to any distributed departments.
In addition, these fully integrated systems establish a foundation platform for delivering Web-based services and transactions, providing additional value to the organization and its customers.

IDLDPL contains the following modules:-?

Masters – First interface for add Employer, Customer, Supplier, Products etc as well as all the dropdown down values like Bank name, Brand Name etc.

Sale – Generate Order Form, Order Purchasing Form, and Invoice all with Edit, View Copy and Detail Facilities.

Purchase – Generate Purchase Order, Receive Invoice all with Edit, View Copy and Detail Facilities.

Stock Transfer – Generate Stock Transfer Request, Edit, And View Than Dispatch. As well as Received Request with Data Base Update.

Stock Return – Generate Stock Return to Supplier and From Customer with same Process as like Stock Transfer.

Payment – Used For All Payment Sent and Received Purpose.

Other – Containing the Other Forms like Job, News, and Products Offers etc…

Friday, May 29, 2009

Difference between Abstract Class and Interface ?

Dev Palmistry


Abstract Class:

# IS-A relationship.
# e.g. Student IS A Person, Employee IS A Person.
# cannot be instantiated.
# normally used for framework-type library classes: providing default behavior for some of its class members, but forcing the developer to implement

others.
# It has to be inherited for use .
# You need to INHERIT to use an abstract class.
# Attempting to instantiate an object of an abstract class retults in a compilation error
# Any Class with abstract method or property in it must be declared abstract
# Abstract will allow you to set the access specifier. Ex:- (private,public, protected, internal).
# Abstract will allow you to implement the body in abstract methods.
# Situation where functionality may add/remove "Abstract Class" is best solution.
# Eg. Creating Base Classes,Creating Base for your project where functionality may be added or remove or can be override if needed.Mostly common task are

move to base class and if required than can be overrided.


# in Abstract class you can Declare the Constructors,fields,methods,indexes,destructors etc

# practical example for abstract class:

we can use account class in bank as abstract class.inreality

there will be no account we can use .but only sbaccount and current account will be exist.so we can use account class as abstract

class and we can inherits this class in sbaccount class,current account class


# Example:
pulic Abstract Class A
{
public void Hi();

public void Hello()
{
Console.WriteLine("hello method");
}

}
public Class B
{
public overid void Hi()
{
Console.WriteLine("hi method");
}



2. Abstract Class: Allows common functionality to be shared across similar objects


Of course, don't use an abstract class in cases where functionality doesn't need to be shared.





Interface:

# CAN-DO relationship.
# e.g. Student CAN enrol, Student CAN submit assignment.
# cannot be instantiated.
# group of related methods with empty bodies .
# You need to IMPLEMENT to use an interface.

# The implementation of an interface is left completely to the developer.
# Interfaces can contain only the signature of a method but no body.
# Interfaces are used to declaring functionality.
# By default all interface methods are public.
# Situation where we have fix requirement "Interface" is best solution.
# Eg. Plugin .Where Pluging can be loaded dynamically and executes its functionality.
Thus that Plugin must follow or implement certain functionality.
# In class you can implement the interface method, but can’t implement the body in Interface method.
# in interface you can not Declare the Constructors,fields,methods,indexes,destructors
# Examples:'
//mutltiple inhiritance
Interface IA
{
void cat();
void Dog();
}
Interface IB
{
void door();
void tyres();
}
public class C:IA,IB
{
public void cat()
{
Console.WriteLine("hello cat method");
}
public void dog()
{
Console.WriteLine("hello dog method");
}
public void door()
{
Console.WriteLine("hello door method");
}
public void tyres()
{
Console.WriteLine("hello tyres method");
}
}



Exp : 1. Interfaces are useful when you do not want classes to inherit from unrelated classes just to get the required functionality. For example, let bird

be a class with a method fly(). It will be ridiculous for an aeroplane to inherit from bird class just because it has the fly() method. Rather the fly()

method should be defined as an interface and both bird and aeroplane should implement that interface.


Exp 2. Hi what suits my case !! Say a real estate builder is constructing an apartment with many flats.All the rooms in the flats have the same design,except

the bedroom. The bedroom design is left for the ppl who would own the flats i.e; the bedRooms can be of different designs for different flats.
I can achieve this through an abstract class like below:

public abstract class Flat
{
//some properties

public void livingRoom(){
//some code
}

public void kitchen(){
//some code
}

public abstract void bedRoom();

}

An implementation class would be as follows:


public class Flat101 extends Flat
{
public void bedRoom() {
System.out.println("This flat has a customized bedroom");
}

}



# Interface is without implementation, just interface or virtual methods.

# As per my understanding, it is can-do or is-do relationship. Like, from .NET framework, there are many interface like IComparer, ISortable etc. So, it is

something like, classes derived from the interface CAN-DO these things.


Defference :



# A class can inherit one or more interfaces, but only one abstract class.

# An abstract class can have abstract members as well non abstract members. But in an interface all the members are implicitly abstract and all the members

of the interface must override to its derived class.

# The members of the interface are public with no implementation. Abstract classes can have protected parts, static methods, etc.

# Interface are similar to abstraction classes.However , interfaces represent the higest level of abstraction in Object- oriented programming.This is because

all the methods in an interface are abstract and do not have implementation.In contrast ,the abstract classes might contain a method that has a body.

# 1).Interface have only signature. whereas Abstract class have signature and definition both r allow. 2). Interface have not allow modifier access. whereas

Abstract class are allowed modifier access. 3).Thurogh the Interface we can create the Multiple Inheritance whereas Abstract class are not allow the Multiple

Inheritance. 4).Interface is slower compare Abstract class.

# An abstract class may contain complete or incomplete methods. Interfaces can contain only the signature of a method but no body. Thus an abstract class can

implement methods but an interface can not implement methods. · An abstract class can contain fields, constructors, or destructors and implement properties.

An interface can not contain fields, constructors, or destructors and it has only the property's signature but no implementation. · An abstract class cannot

support multiple inheritance, but an interface can support multiple inheritance. Thus a class may inherit several interfaces but only one abstract class. · A

class implementing an interface has to implement all the methods of the interface, but the same is not required in the case of an abstract Class. · Various

access modifiers such as abstract, protected, internal, public, virtual, etc. are useful in abstract Classes but not in interfaces.

# Interface:- 1. Interfaces are used to declaring functionality. 2. By default all interface methods are public. 3. In class you can implement the interface

method, but can’t implement the body in Interface method. Abstract:- 1. Abstract will allow you to set the access specifier. Ex:- (private,public, protected,

internal). 2. Abstract will allow you to implement the body in abstract methods. 3. You can inherit the abstract methods in classes

# • Abstract Class
Cannot be instantiated.
Must be inherited and its methods should be overridden.
It have some concreate methods.
Access modifiers allowed.


• Interface
Have definition of a method not implementation. (implement through class)
Multiple inheritance possible through Interface only
Only Public Access modifier only allowed. Defaultly Public
No need of virtual overridden.
It’s used for to define a set of properties, methods and events.

# Following are the difference between abstract and interface,

1>Abstract class having method declaration as well as method method definition whereas interface having method declaration only.

2>Abstract class are known as partial abstract class whereas interface is known as fully abstract class.

3>Abstract class features we have to inherit to the child class whereas interface features we have to implement in the child classes.

4>Abstract class support access specifiers whereas interface doesn't support access specifiers.

5>Abstract class have normal variable as well as constant variable whereas interface have only constant variables.(Discuss it)

6>We can write constructor in abstract class whereas we can't write constructor in interface.

# Interfaces are similar to abstract classes.However,interface represent the highest level of abstraction in object-oriented programming.This is because all

the methods in an interface are abstract and do not have implementation.In contrast,the abstract classes that are created using Abstract keyword might

contain a method that has a body.

# Abstract Class vs. Interface
· An abstract class may contain complete or incomplete methods. Interfaces can contain only the signature of a method but no body. Thus an abstract

class can implement methods but an interface can not implement methods.

· An abstract class can contain fields, constructors, or destructors and implement properties. An interface can not contain fields, constructors, or

destructors and it has only the property's signature but no implementation.

· An abstract class cannot support multiple inheritance, but an interface can support multiple inheritance. Thus a class may inherit several

interfaces but only one abstract class.

· A class implementing an interface has to implement all the methods of the interface, but the same is not required in the case of an abstract Class.

· Various access modifiers such as abstract, protected, internal, public, virtual, etc. are useful in abstract Classes but not in interfaces.

· Abstract classes are faster than interfaces.

What is WSDL ?

Dev Palmistry

Que: What is WSDL ?
Answer: WSDL stands for Web Services Description Language, a standard by web services can tell clients what messages it accepts and which results it will return. It provides you information on the classes and methods that are supported by a particular web services.

What is UDDI ?

Que : What is UDDI ?
Ans: UDDI is Universal Description, Discovery and Integration Language. UDDI allow you to find web services by connecting to a directory. It is a directory that can be used to publish and discover public web services.

How to prevent a button from validation it’s form?

Que: How to prevent a button from validation it’s form?
Answer: Set the Causevalidation property of the button control to false . This is useful while user presses reset button.

Explain Unmanaged Environment From Dot Net Framework.

Que: Explain Unmanaged Environment From Dot Net Framework.
Answer : Code that does not operate within the CLR is called unmanaged code. Unmanaged code does not get benefits offered by CLR including garbage collection, memory management, security, etc. Exp. COM component are unmanaged code.

Explain Managed Environment From Dot Net Framework .

Que: Explain Managed Environment From Dot Net Framework .
Answer : Code that operates within the CLR is called managed code. Managed code benefits form the services that the CLR offers, including garbage collection, memory management, security etc.

When during the page process cycle is viewing available?

Que: When during the page process cycle is viewing available?
Answer : After the init() and before the Page_Load(), or OnLoad() for control.

What is the .resx file ?

Que : What is the .resx file ?
Answer: The .resx resource file format consists of XML entities, which specify objects and string inside XML tags.

What is Event Bubbling ?

Dev Palmistry

Que: What is Event Bubbling?
Answer: Server control like Data Grid, Datalist, Repeator can have other child controls inside them. Exp Datagrid can have conbo box inside datagrid.Thise child control do not raise there event by themselves , rather they pass the event to the container parent (which can be a daragrid, datalist, repeater) , which passes to the page as “Itemcommand “ event. As the child control send there event to parent this is termed as event Bubbling.

What is WebServices ?

Que: What is Web Services ?
Answer : Web Services is an application that is designed to interact directly with other application over Internet.

Web Services is : Platform Independent, Language Independent and Protocol Independent.

Web Services communicate by standard web protocol and data format such as HTTP, XML and SOAP.

Example of Web Services: Whether Report Services, Stock Quote and News Headlines.

Tuesday, April 14, 2009

Difference between Trace and Debug Class !

Dev Palmistry

Trace and Debug classes :

Fortunately, you do not have to step through an application line by line to figure out what is happening.

The Systems.Diagnostics namespace includes Trace and Debug classes.

These two classes (which are essentially identical) include a number of static methods that can be used to cause your code to gather information about code-execution paths, code coverage, and even performance profiling. Both classes also provide an Assert method that checks for a condition and displays a message if the condition is false.


Tracing : Tracing is actually the process of collecting information about the program's execution.



Debug : Debugging is the process of finding & fixing errors in our program.



What’s the difference between the Debug class and Trace class?

Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds.

----------------------------------------------------------------------------------------
Please Give a Glance......
dev-palmestry.blogspot.com/
of this blog.

----------------------------------------------------------------------------------------

Monday, February 23, 2009

Join-Cross join

A join is a query that combines rows from two or more tables, views, or materialized views.
Most join queries contain WHERE clause conditions that compare two columns, each from a different table. Such a condition is called a join condition.
CROSS JOIN (Cartesian product) is the simplest join.
We can start with the simplest possible join -- the "cross join" (or Cartesian product). If we have two database tables consisting of information about CDs and musical artists:






A join simply multiplies the two tables together into a new virtual table. There are four members of the Artists table and seven members in the CDs table which will result in 28 (!) rows in the result. You can try this using the following syntax,
SELECT * FROM Artists, CDs
and you should see a result that looks like the following table:



This table is typically filtered using the WHERE clause, for example

SELECT * FROM Artists, CDs WHERE Artists.ArtistID=CDs.ArtistID

Thursday, February 19, 2009

Some Practical .Net Soultions !!

Que : How To Convet Uppercase later ?

Ans : Select UPPER (dir_name) as name from tbldirectots.
The out put will come like DENESH KUMAR, VIJAY SHUKLA


Que . How to get the image on the user page by DataReader ?

Ans : TitleImage.Imageurl=folderpath + dirv["au_page_image"].ToString() ;
Note : 1 . For getting the folderpath we use this code on .cs page public string folderpath =
ConfigurationManager.AppSettings["folserpath"].ToString () ;
2. This key is defined in the Web.Config file like that -
<>
< key="folderpath" value="upload/">
3. Upload is the folder where the image is stored .
4. ImageUrl is like txt for text box of Image .Like txtname.text .


Que : How to show the Image on the User Page by GridView ?
Ans : By This Code
'/> Note : 1. In The Upload folder , image is stored there .Image has two things one Image and
second its name (boy.jpg)
2. Image Name like (boy.jpg) is saved in database's field like (dir_image) .
Mistake : One mistake when i was using DataReader .
Ans : 1. In the DataReader while loop are used . i don't know foreach loop can be used or
not , but when i was using it was not working .I was using foreach loop in DataReader and it
was not working ,it takes of time but did't work and ultimately i used while loop and i got
my task .
2. Sql DataReader DerDr=DirCom.ExecuteReader() ;
if (DerDr.HasRows)
{ while(DerDr.Read())
DirName=DirName + "" + DerDr["dir_name"].ToString() +" "
1:
}


Que : What syntax is used for Back Button ?
Ans : < href="javascript:history.back(-1);"> Back

Que : A Query for select the fixed character ?
Ans : string str = "select top 4*,substring (pr_title,1,100) as detail from tblProjectMaster
where pr_active='yes'and pr_delete='No' order by pr_iddesc" .


Que : What is the Syntax for Back link and Forword link ?
Ans : Syntax for Back link and Forword link :
< href="javascript: history .go (-1)">
< href="javascript: history .back(-1)">


Que : What is the code for OnImage Click ?
Ans : < width="100" class="hometxt">
< href="'Upload/<%">' rel="lightbox > <
img src='Upload/<% Databinder.Eval(Container,"DataItem.image") %>' style=""bordercolor=""
width="" hight="" border="" />
On putting mouse over image this link will appear -
http://localhost:1713/smi/upload/sunset.jpj .


Description of Project !!



Take an example of Project and we will discuss that how can you describe a project, there is an project SMI, and it is its URL...
http://www.smigroup.com.au/

Description of Project : SMI Project Description

SMI project has module 2 module : First is User and Second is Admin .
Here first i am explaing about User Part :
user part has the following module :
1. Home
2.About Us
3.Leadership

4.SMI Project Sulutions
5.SMI Building Services
6.SMI Fire Services
7.News & Events
8.Careers
9.Contact Us
Module 2 : In this module we explane what we are and which types of services we are providing .
Module 3 : In This module we explain the we are leader in this fiels to provies services, by giveing any person or company status. That we are the leader in this field.
Module 4 : SMI Project Solution has there part :
1.Project Solutions Profile
2.Project Gallery
3.Key People
1 . Project Solution Profile :
SMI Project Solutions provides the following construction contracting and professional management services: Fitout and refurbishmentConstructionLump sum contractingBuilding and Fire ServicesDesign and constructProject and construction managementProgram and cost management
This page show two thigs : Know about our KEY PEOPLE and second is Latest Projects .

In This page the 4 latest project has been shown with Project Code and Title . You can say this page is a like a listing of project and by this you can see aal the project by clicking show all link . And it ypu want to see the detail of the project just clik the image or link to see the detail of the project . In the project detail you can see 1. Project Code , 2.Duration (Starting Date and Ending date),3.Project Value (In Ruppes or $) , 4.Client (Client Name) , 5.Description . In The Description part there are some more information is being provided like - 1.Client Detail, 2.Architect, 3.Project Description , 4.Form of Contract Used ,5.Additional Information (With Project Detail there is also some image has been shown )
2 . Project Gallery : In the projct Gallery, you can see the - 1.Project Image , 2. Project Code , 3.Starting Date and Ending Date , 4.and Title of Project are shown as listing with 5 or 6 records and there is paging is being used .And link has been given to see the Detail in the Image and Title both .
If you want to see the Detailof the Project ,click the Image and see the Details. Details have the folloeing headlines - 1.Project Code ,2.Duration , 3.Project Value , 4.Title , 5.Client, 6. Description
. Description has folloeing headlines - 1.Client details , 2.Architect ,3.Project Description ,4.Project Description ,5.Additional Information (In additional information it explane about the project and some image of projects )
3.Key People : In this section 1.Team Leader/Director, 2.Project Manager ,3.Construction Manager, 4.Site Manager's Details are given With Their Photos.


Module 5 : SMI Building Services mdoule has simlarly three parts like the SMI Project Solution has
1.Building Services Profile
2.Project Gallery
3.Key People

Module 6 : Similarly SMI Fire Services has .

Module 7 : In The News and Events Module : The listing of New and Events are being shown in the form of Image , Title , Little Description and Date . Paging is also used in this page because the listings are shown in the 5 or 6 records.And if user wants to know about the Details the News and Events click the Title link and see the Details of the News. News and Events are shown in the following headlines - 1. Title , 2. Image ,3. Details itc.
Module 8 : In this module , this module look like that ;
We are expanding our team resulting in exciting opportunities in all areas of our business.
Our team consists of skilled, innovative and passionate people with unique ideas and approaches. We seek challenges, assume leadership, and continuously exceed goals. In return, we share in generous rewards and have the opportunity to be involved in some of the most exciting projects.
Please forward your CV via the contacts below.
E-mail:
reception@smigroup.com.au or Postal Address: SMI Careers20 Challis StreetDICKSON ACT 2602
Current Openings : By clicking this link we can find the vacanicies for different post with description . Any condidate who are interested can fill the form or apply for the specific post .

Module 9 : In this module we will get the information about the Company and maps, like that :
SMI FITOUT PTY LIMITED ABN: 91 115 312 546
Canberra
T : (02) 6230 6995F : (02) 6262 9945E :
reception@smigroup.com.au
Office Address20 Challis StreetDICKSON ACT 2602
Postal AddressPO Box 409DICKSON ACT 2602
View Larger Map







Server Contrl's ID Property !!



Que : What is the ID of ASP.NET server controls ? And why it is used ?

Ans : By ID property of the server control, we can uniquely identify the control.We can not have the two server contros on the same wev forms with same ID. The ID of server control is used as a reference in the c# source code behind file .cs file.
For your control's ID name use some meaning full nameing covention so that your code become more readable and easier to understand.It is very difficult to debug and maintain a program where the control names are TextBox1, Button1, and so forth.
So there are some prefixes appended with meaningful name for server control.
txt = TextBox (e.g. txtLastname)btn = Button (e.g. btnSavedata)ddl = DropDownList (e.g. ddlAccounts)chk = CheckBox (e.g. chkAdmin)rb = RadioButton (e.g. rbSpringsemester)


Event Handler Method !!

Que : What is Event Handler Method ?

Ans : An event handler method is a special type of Method in an ASP.NET web page that defines the actions that will occur when a particular event occurs.

Example : Take an examle of event handler method, first take an event : click event. We saw that if you are int the Design view for a wev form and you double click on a Buttion control, Visual Web Developer or Visual Studio will automatically generate an event handler Method called Buttion_Click.Basically an empty method is generated and Visual Web Developer or Visual Studio lets you put what ever code you want into that event handler.

Que : What is the meaning the event driven model ?


Ans : ASP.NET uses an event driven programming model.This means that in order for code to run, an event must occur that triggers or tells ASP.NET to run an event handler Method.

Que : What is the naming convention of Event Handler Method ?

Ans : Notice the naming convention that Visual Web Developer when it generates the event handler Method. The first part of the name is the ID for the server control: Button1. The second part of the name an underscore appended with the event type: Click. This convention helps you as the developer know when that Method will be called by ASP.NET. In this case, the click event fires when a user single clicks on the Button control.