Wednesday, January 14, 2009

Object Oriented Interview Question Part 1- Benefits Of Inheritance

Following are the benefits of the inheritance...
  1. Through inheritance we can eliminate the redundant code and extend the user of the existing classes.
  2. We can build program from the standard working modules that can communicate with the one another rather then having start writing code from beginning.
  3. It is possible to have multiple instances of objects of class without any interface.
  4. It is easy to partion the work.
  5. Object oriented system can be easily upgraded from the small to the large systems.
  6. Easily modifying and extending implementations of components without having to recode everything from scratch.
Share:
Tuesday, January 13, 2009

Happy New Year 2009

Hello Guys,

I am jalpesh vadgama wishing you a very happy and healthy new year ahead. Sorry i was busy with my projects so not able to post anything related to dot net. Now i am back with the all the things and promise to be regular post. If you want to listen anything from me then please post comment.

Last year was hectic to me as lots of things are going on now my house is also shifted and i have broadband connection at my home. We can have conservation regularly.
Share:
Monday, August 11, 2008

How to add service reference dynamically from user control? Microsoft Ajax

First, Create a web page default.aspx and put the html code as following..

---------------------------------------------------------------------------
<asp:ScriptManager ID="MainScriptManager" runat="server">
</asp:ScriptManager>
--------------------------------------------------------------------------

Now, Create a usercontrol my first user control

Create a function called AddScriptReference as following...

'--------------------------------------------------------------------------
private void AddScriptReference()
{
     ScriptManager scriptManger = ScriptManager.GetCurrent(this.Page);
     if (scriptManger != null)
     {
         ServiceReference serviceReference = new ServiceReference();
         serviceReference.Path="~/MyWebService.asmx";
         serviceReference.InlineScript = false; 
         scriptManger.Services.Add(serviceReference);   
     }
     else
     {
         throw new Exception("Script Manager Not Found");
     }
}
'--------------------------------------------------------------------------
Then override controls init event as following...

'--------------------------------------------------------------------------
protected override void OnInit(EventArgs e)
{
     AddScriptReference();
     base.OnInit(e);
}
'--------------------------------------------------------------------------

Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews