Tuesday, 9 July 2013

Design a class employee (ID, NAME, SALARY) and overload ‘>’ operator for this class (ASP Webpage). Now design a webpage which will create two employee type objects and display the details of the highest paid employee in another webpage.

Create a 'Employee.cs' class file to your App_Code folder:


Add following this code:
Employee.cs

Notice that you can't just overload '>' in isolation, you have to overload '<' as well.

Now design your first web page that is 'Default.aspx':
 Default.aspx
 
 
Add following this code:
Default.aspx.cs ( put this code in the button's Click handler:)

Now design your 2nd web page that is 'Default2.aspx':
Default2.aspx
 

Default2.aspx.cs ( put this code in the button's Click handler:)

Then Run Default.aspx

Then click "Submit & Go" button to go to "Default2.aspx" page then
Click "Compare" button of "Default2.aspx" page.

 
Then Show the appropriate result against those employees.


No comments:

Post a Comment