Wednesday, September 16, 2009

ajax using and webmethod usage






ServicePath="~/Service/areasService.asmx" ServiceMethod="FindAreas" />





public class areasService : System.Web.Services.WebService
{


[WebMethod]
public String[] FindAreas(String prefixText, int count)
{
//return all records whose Title starts with the prefix input string
PhysicianDAO phyDao = new PhysicianDAO();
List titleArList = new List();
//string prefixText1 = Trim(prefixText);
Area[] areasList = phyDao.GetAreaList(prefixText);
foreach (Area area in areasList)
{
String strTemp = Convert.ToString(area.AreaName) + "," + Convert.ToString(area.State.StateCode);
titleArList.Add(strTemp);
}
return titleArList.ToArray();
}
}

Friday, July 17, 2009

Access specifires in dotnet


1. PUBLICAs the name specifies, it can be accessed from anywhere. If a member of a class is defined as public then it can be accessed anywhere in the class as well as outside the class. This means that objects can access and modify public fields, properties, methods.
2. PRIVATEAs the name suggests, it can't be accessed outside the class. Its the private property of the class and can be accessed only by the members of the class.
3. FRIEND/INTERNAL Friend & Internal mean the same. Friend is used in VB.NET. Internal is used in C#. Friends can be accessed by all classes within an assembly but not from outside the assembly.
4. PROTECTEDProtected variables can be used within the class as well as the classes that inherites this class.
5. PROTECTED FRIEND/PROTECTED INTERNALThe Protected Friend can be accessed by Members of the Assembly or the inheriting class, and ofcourse, within the class itself.

6. DEFAULTA Default property is a single property of a class that can be set as the default. This allows developers that use your class to work more easily with your default property because they do not need to make a direct reference to the property. Default properties cannot be initialized as Shared/Static or Private and all must be accepted at least on argument or parameter. Default properties do not promote good code readability, so use this option sparingly.

NormalForms and ddl,dcl,dml,tcl commands

DDL : CREATE, ALTER, DROP
DML : INSERT, UPDATE, DELETE
DCL : GRANT, REVOKE
TCL : COMMIT, SAVE POINT, ROLLBACK
DQL : SELECT
-- Normalization is a process of efficiently organizing data in the database.
-- goles of NF: There are two goals of the normalization process: eliminating redundant data (for example, storing the same data in more than one table) and ensuring data dependencies make sense (only storing related data in a table).
-- 1stNF : The first normal form (or 1NF) requires that the values in each column of a table are atomic. By atomic we mean that there are no sets of values within a column.
1NF --every row should be in atomic form....there should not be more than one value for an attribute in a row...
2NF --there should be no partial dependency. it means that there should be no dependency between part of a key to non-key. This does not happen if you choose a single attribute as your primary key.
3NF -- there should be no transitive dependecy. we can also say as there should be no Non-Key to Non-key dependency...
BCNF -- every determinant should be a candidate key.

Thursday, July 16, 2009

to change aspx extension to .gt

these changes enough to change ".aspx" extension to ".gt" in our application changes in web.config file add these

add entry in

//add extension=".gt" type="System.Web.Compilation.PageBuildProvider" //

in
buildProviders

then add

//add path="*.gt" verb="*" type="System.Web.UI.PageHandlerFactory" validate="true" //

entry in
httpHandlers


then change all .aspx extensions to .gt in our application. now .gt will work as .aspx