Static modifier used with the class, field, method, properties, operator, event and constructors. We can not use static modifier with indexers, destructors. When we use static modifier with the members then they are no more part of instance of a class. Static members are a part of class itself. For example: public class MyClass { public struct MyStruct { public static int x = 100; } } //To refer to the static member x, use the fully qualified name MyClass.MyStruct.x Consider a class that represents ......
In ADO.NET 2.0 DataTable is come up with Load method which takes IDataReader as a parameter. If datatable is already contains the rows the incoming data from the datasource merged with the existing rows. http://msdn2.microsoft.com/... Cheers Mahesh maheshsingh21@hotmail.com ASP.NET Interview Questions | C# Interview Questions | .NET Interview Questions | Dot Net Interview Questions | VB.NET Interview Questions | Oracle Interview Questions ......
If you have any issue related to your SMTP configuration before going to www.live.com, www.google.com etc. go for the http://www.systemwebmail.com/ this is cool site which contains plenty of problems with their solutions. Cheers! Mahesh maheshsingh21@hotmail.com ASP.NET Interview Questions | C# Interview Questions | .NET Interview Questions | Dot Net Interview Questions | VB.NET Interview Questions | Oracle Interview Questions ......
Few day back i need error code like 404 in Application_Error event handler. I tried and finally got it. Dim httpErrorCode As IntegerDim Last Error As HttpExceptionLastError = HttpContext.Current.Server.... = LastError.GetHttpCode() That gives us http error code that would have been sent to the browser if I had not intercepted the error. Cheers!.. Mahesh maheshsingh21@hotmail.com ASP.NET Interview Questions | C# Interview Questions | .NET Interview Questions | Dot Net Interview ......
The error caused by an ASP.net 2.0 feature named Event Validation. This is a security feature ensures postback events allowed and created by the server to help prevent spoofed postbacks. This feature is implemented by having controls register valid events when they render. The end result is that at the bottom of your rendered tag, you'll see something like this: When a postback occurs, ASP.net uses the values stored in this hidden field to ensure that the button you clicked invokes a valid event. ......
I had a problem today using a custom control with button. Clicking on the button gave me the following error: “Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true... in configuration or <%@ Page EnableEventValidation="true" %> in a page. This verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid then ClientScriptManager.Registe... ......
Few days back In my project I have to run a batch file which contains the series of piped MS-DOS commands to deals with Active Directory. Running batch file through ASP.NET requires impersonate the user id (for ASP.NET aspnet account), which requires lots of code and require understanding of windows securities. I found one work around which is very easy and no need of extra coding. In MS SQL Server there is one stored procedure named “xp_cmdshell” which executes a given command string as an operating-system ......