What should you do to store an object in a viewstate?



What should you do to store an object in a viewstate?..

Answer / Ankit Jauhari

To store an object in ViewState in ASP.NET, first serialize the object using the System.Web.UI.ScriptBuilder or BinaryFormatter classes, and then add it as a key-value pair to the ViewState dictionary.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

What is Ajax design pattern in .NET?

1 Answers  


Is .net core managed code?

1 Answers  


1.What is the major advantage of polymorphism? Please don't simply say binding. Specify any other reason.

2 Answers   247Customer,


Explain role-based security in .Net.

2 Answers  


What is iis? Have you used it?

1 Answers  


Can you configure a .NET Remoting object via XML file?

1 Answers  


What are the security policy levels in .Net

1 Answers  


Explain how to manage pagination in a page using .net?

1 Answers  


What does the "EnableViewState" property do?

1 Answers  


What is reflection and what is it for?

1 Answers  


What is .net3.0 and .net3.5?

1 Answers  


How to create properties and methods using controls?

1 Answers   CGI,


Categories