The procedure to solve this problem is very easy. Start each method with a Web Method attribute. Add Description property to add a description of web method and MessageName property to change web method name.
namespace TestOverloadingWebService
{
[WebService(Namespace = "http://tempuri.org/", Description=" <b> Function
overloading in Web Services </b>")]
public class OverloadingInWebService : System.Web.Services.WebService
{
[WebMethod(MessageName = "AddInt", Description = "Add two integer
Value", EnableSession = true)]
public int Add(int a, int b)
{
return (a + b);
}
[WebMethod(MessageName = "AddFloat", Description = "Add two Float
Value", EnableSession = true)]
public float Add(float a, float b)
{
return (a + b);
}
}
}
Wednesday, 21 April 2010
Tuesday, 20 April 2010
JavaScript Question
Q1. Disbable back option by java script
Ans. window.history.go(+1) use in java script;
or
onunload =window.history.go(-1) in body tag
onunload =window.history.go(-1) in body tag
Q2. we can disable the right click using
Ans. <body oncontextmenu="return false">
</body>
</body>
Virtual functions in C#
Virtual functions implement the concept of polymorphism are the same as in C# except that you use the override keyword with the virtual function implementaion in the child class. The parent class uses the same virtual keyword. Every class that overrides the virtual method will use the override keyword.
class Shape
{
public virtual void Draw()
{
Console.WriteLine("Shape.Draw") ;
}
}
class Rectangle : Shape
{
public override void Draw()
{
Console.WriteLine("Rectangle.Draw");
}
}
class Shape
{
public virtual void Draw()
{
Console.WriteLine("Shape.Draw") ;
}
}
class Rectangle : Shape
{
public override void Draw()
{
Console.WriteLine("Rectangle.Draw");
}
}
Cycle OF ViewState Available
When during the page processing cycle is ViewState available?
After the Init() and before the Page_Load(), or OnLoad() for a control.
After the Init() and before the Page_Load(), or OnLoad() for a control.
Sunday, 18 April 2010
Difference between Rollup and Cube
You can use the CUBE and ROLLUP operators to generate summary information in a query. A CUBE operator generates a result set that shows the aggregates for all combinations of values in the selected columns. A ROLLUP operator generates a result set showing the aggregates for a hierarchy of values in the selected columns. Both the CUBE and ROLLUP operators return data in relational form.
The CUBE operator generates a multidimensional cube result set. A multidimensional cube is an expansion of fact data, or the data that records individual events.
This expansion is based on columns that the user wants to analyze. These columns are called dimensions. A cube is a result set that contains a cross tabulation of all the possible combinations of the dimensions.
The CUBE operator is specified in the GROUP BY clause of a SELECT statement. The select list contains the dimension columns and aggregate function expressions. The GROUP BY specifies the dimension columns by using the WITH CUBE keywords.
The result set contains all possible combinations of the values in the dimension columns, together with the aggregate values from the underlying rows that match that combination of dimension values.
The ROLLUP operator is useful in generating reports that contain aggregate values. The ROLLUP operator generates a result set that is similar to the result set generated by the CUBE operator.
However, the difference between the CUBE and ROLLUP operator is that the CUBE generates a result set that shows the aggregates for all combinations of values in the selected columns. By contrast, the ROLLUP operator returns only the specific result set.
The ROLLUP operator generates a result set that shows the aggregates for a hierarchy of values in the selected columns. Also, the ROLLUP operator provides only one level of summarization, for example, the cumulative running sum in a table.
The CUBE operator generates a multidimensional cube result set. A multidimensional cube is an expansion of fact data, or the data that records individual events.
This expansion is based on columns that the user wants to analyze. These columns are called dimensions. A cube is a result set that contains a cross tabulation of all the possible combinations of the dimensions.
The CUBE operator is specified in the GROUP BY clause of a SELECT statement. The select list contains the dimension columns and aggregate function expressions. The GROUP BY specifies the dimension columns by using the WITH CUBE keywords.
The result set contains all possible combinations of the values in the dimension columns, together with the aggregate values from the underlying rows that match that combination of dimension values.
The ROLLUP operator is useful in generating reports that contain aggregate values. The ROLLUP operator generates a result set that is similar to the result set generated by the CUBE operator.
However, the difference between the CUBE and ROLLUP operator is that the CUBE generates a result set that shows the aggregates for all combinations of values in the selected columns. By contrast, the ROLLUP operator returns only the specific result set.
The ROLLUP operator generates a result set that shows the aggregates for a hierarchy of values in the selected columns. Also, the ROLLUP operator provides only one level of summarization, for example, the cumulative running sum in a table.
Subscribe to:
Comments (Atom)