Calling Postback from Javascript

There may be some scenario where you may want to explicitly postback to the server using some clientside javascript. It is pretty simple to do this. ASP.NET already creates a client side javascript method as shown below to support Postbacks for the web controls: function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); } } So, all you have to do is, just call this method with appropriate arguments. You may call this as shown below: <script type=”text/javascript” language=”Javascript”>// <![CDATA[ __doPostBack('__Page', 'MyCustomArgument'); // ]]></script> However, it is not recommended to use … Click here to continue reading.

What is LINQ?

Language Integrated Query (LINQ), is a component released within the .NET 3.5 Framework. It is one of the most powerful features of .NET 3.5. It serves the purpose of querying objects. LINQ comprises a series of operators, which are used to query, filter and project data in arrays, enumerable classes, relational databases and XML. In order to query data, the data needs to be encapsulated as an object. In case the data source is not an object, it first needs to be converted to an object in order for LINQ to query it. LINQ has its own Query Processing Engine. … Click here to continue reading.

What is SOAP?

SOAP (Simple Object Access Protocol) is a simple XML-based messaging protocol to let applications exchange information over HTTP. It defines a set of rules for structuring messages that can be used for simple one-way messaging but is particularly useful for performing RPC-style (Remote Procedure Call) request-response dialogues. It is not tied to any particular transport protocol though HTTP is popular. Nor is it tied to any particular operating system or programming language so theoretically the clients and servers in these dialogues can be running on any platform and written in any language as long as they can formulate and understand … Click here to continue reading.

What is System.Object Class?

Languages typically do not require a class to declare inheritance from Object because the inheritance is implicit. Because all classes in the .NET Framework are derived from Object, every method defined in the Object class is available in all objects in the system. Derived classes can and do override some of these methods, including: Equals – Supports comparisons between objects. Finalize – Performs cleanup operations before an object is automatically reclaimed. GetHashCode – Generates a number corresponding to the value of the object to support the use of a hash table. ToString – Manufactures a human-readable text string that describes … Click here to continue reading.

Web Developer Framework 4.0 Sample Questions – 3

Question: You have created an ASP.NET server control named Shopping Cart for use by other developers. Some developers report that the Shopping Cart control does not function properly with ViewState disabled. You want to ensure that all instances of the Shopping Cart control work even if ViewState is disabled. What should you do? Require developers to set EnableViewStateMac to true. Store state in ControlState instead of ViewState. Serialize the state into an Application state entry called “MyControl”. Require developers to change the session state mode to SQLServer. Correct Answer: 2 Question: You are troubleshooting an ASP.NET Web application. System administrators … Click here to continue reading.