Posts

Showing posts from 2008

In Windows application Tag Property of radio button (controls) is useful as like value field of controls in web Application

I don't have so much experience in windows application.. at that time i have gone through internet for Value Filed property of Controls in windows application. but i haven't find any link then i have gone through Property windows of Radio Button (any control).then I used that TAG property like a value field as we are using in web application. I used it in one of my desktop application.see this one of the step of XML Operation(XMLNodeIterator) for eg. rbButton.Tag = (object)xNodeIterator.Current.GetAttribute("ansId", "");

How to get motherboard serial number, Processor ID, VolumeSerialNumber using C#?

Add using System.Management; namespace in your application then //Get motherboard's serial number ManagementObjectSearcher mbs = new ManagementObjectSearcher("Select * From Win32_BaseBoard"); foreach (ManagementObject mo in mbs.Get()) { textBox1.Text = mo["SerialNumber"].ToString(); } //Get Processor's Identity mbs = new ManagementObjectSearcher("Select * From Win32_processor"); foreach (ManagementObject mo in mbs.Get()) { textBox2.Text = mo["ProcessorID"].ToString(); } //Get Network Adapter Configuration mbs = new ManagementObjectSearcher("Select * From Win32_NetworkAdapterConfiguration"); foreach (ManagementObject mo in mbs.Get()) { textBox3.Text = mo["MACAddress"].ToString(); break; }

Building and Consuming XML web services

Creating Web Service using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class HelloHeader : SoapHeader { public string Username; public string Password; } public class HelloSoapHeader : System.Web.Services.WebService { public HelloHeader myHeader; [WebMethod] [SoapHeader("myHeader")] public string HelloWorld() { System.Threading.Thread.Sleep(1000); if (myHeader == null) return "Hello World"; else return "Hello " + myHeader.Username + " Your Password is :" + myHeader.Password; } } Consumming web service Synchronously using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.U

Web page execution

This article is copied from http://www.c-sharpcorner.com/UploadFile/hima_.net/WebPageExecutioninIIS05162006054117AM/WebPageExecutioninIIS.aspx How the Simple Web page execution Happens? As All of us know A Request comes from Client (Browser) and sends to Server (We call it as Web server) in turn Server Process the Request and sends response Back to the Client in according to the client Request But internally in the Web server there is quite interesting process that happens. To get aware of that process we should first of all know about the architecture of the IIS It mainly consists of 3 Parts/Files 1. Inetinfo.exec 2. ISAPI Filter (Container for Internet Server Application Interface dlls) , 3. Worker Process (aspnet_wp.exe) When ever a Request comes from the Client: Inetinfo.exe is the ASP.Net Request Handler that handles the requests from the client .If it’s for static resources like HTML files or image files inetinfo.exe process the request and sent to client If th

asp.net questions

What do I need to create and run an ASP.NET application? Windows 2000, Windows Server 2003 or Windows XP. ASP.NET, which can be either the redistributable (included in the .NET SDK) or Visual Studio .NET. Where can I download the .NET SDK? .NET SDK can be obtained here . (You have to install the Microsoft .NET Framework Version 1.1 Redistributable Package before installing the .NET SDK.) Are there any free IDEs for the .NET SDK? Microsoft provides Visual Studio 2005 Express Edition Beta for free. Of particular interest to the ASP.NET developers would be the Visual Web Developer 2005 Express Edition Beta 2 available as a free download . The ASP.NET Web Matrix Project (supported by Mi

Web Services

Asp Net Web Services : Here are some web services interview questions which is very helpful in interviews. This great listing of interview questions provides a lot of information on Web Services Questions and Web Services Faqs. Not at all, instead of web services faqs and interview questions you can also learn how to use web services in asp net. If you need more web services faqs used in asp net you can also contact us for more info। Question: Can you define basic element of WebServices and explain any one from them? Answer: These are as follows SOAP, WSDL and UDDI. And I am explaining about the SOAP(Simple Object Access Protocol) it is a communication protocol it is for communication between application it is platform and language independent.It is based on XML and also help to get from Firwall. Question: Explain functioning of Web Services Protocols ? Answer: Http-Get: - This is standard protocol that helps client to communicate with s
Remoting is the process through which we can access any remote object from one application domain to another application domain. For creating remote object the class object must be inherited by MarshalByRefObject class. Application domain is the runtime environment of application, For MicrosoftWord, domain is MS office, For .NET programme, .NET runtime environment. Terms Used in Remoting Proxy: To avoid conjunction in networking. Main work is task Distributing.There are two type of proxy. Transparent proxy (There is no physical existence , Created by IIS server ) Real Proxy (Physical Existence) Channel : Channel provides the medium for transfer data from one location to another location. There are two types of channel. TCP(work with Predefined root Connection oriented) HTTP (No need predefined root) Formatters: Change the data in an appropriate format that it can traverse through channels. There are two types of formatters Binary SOAP(Simple Object Ac

more asp.net questiuons

ASP.Net Interview Questions 1. Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process. inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe. 2. What’s the difference between Response.Write() andResponse.Output.Write()? Response.Output.Write() allows you to write formatted output. 3. What methods are fired during the page load? Init() - when the page is instantiated Load() - when the page is loaded into server memory PreRender() - the brief moment before the page is displayed to the user as HTML Unload() - when page finishes loading. 4. When during the page processing cycle is ViewState available? After the Init() and before the Page_Load(), or OnLoad() for a control. 5. What namespace does the Web page belong in

oops questions

OOPs questions Inheritance The process of sub-classing a class to extend its functionality is called Inheritance.It provides idea of reusability. Order of Constructor execution in Inheritance constructors are called in the order from the top to the bottom (parent to child class) in inheritance hierarchy. Order of Destructor execution in Inheritance The destructors are called in the reverse order, i.e., from the bottom to the top (child to parent class) in the inheritance hierarchy. What are Sealed Classes in C#? The sealed modifier is used to prevent derivation from a class. A compile-time error occurs if a sealed class is specified as the base class of another class. (A sealed class cannot also be an abstract class) Can you prevent your class from being inherited by another class? Yes. The keyword “sealed” will prevent the class from being inherited. Can you allow a class to be inherited, but prevent the method from being over-ridden? Yes. Just leave the class publi

Interview Questions c#

Interview Questions C# What’s the implicit name of the parameter that gets passed into the class’ set method? Value, and its datatype depends on whatever variable we’re changing. How do you inherit from a class in C#? Place a colon and then the name of the base class. Notice that it’s double colon in C++. Does C# support multiple inheritance? No, use interfaces instead. When you inherit a protected class-level variable, who is it available to? Classes in the same namespace. Are private class-level variables inherited? Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are. Describe the accessibility modifier protected internal. It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in). C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no par