ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
is it possible to persiste customize object in view state? 
how it is?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: is it possible to persiste customize object in view state? how it is?
Answer
# 1
Yes it is possible to persiste customize object in view 
state, Supposed your are having one variable named x for 
which you want to persist the view state.

dim x as integer
ViewState(Value) = x  

Which can then be accessed as follows: 

x = ViewState(Value)
  
 
Is This Answer Correct ?    0 Yes 0 No
Raovarinder Singh
 
  Re: is it possible to persiste customize object in view state? how it is?
Answer
# 2
You have to use <Serializable()> attribute prefixed to the 
class declaration before you keep object of this class in 
viewstate.  However, larger the object, slower will be 
performance.  There will be risk of viewstate getting 
corrupted.  

Eg
'' in class definiton:
<serializable()> Public Class Fruit
 private sName as string
 public sub new(ByVal Name as string)
    sName = Name
 End Sub
readonly property Name as string
  Get 
    return sName
  end get
End Class

''in code behind:
if page.ispostback = false
   dim MyApple as new Fruit("Kashmiri Apple")
   ViewState("oMyFruit") = MyApple
end if

'' In button click
label1.text = ctype( ViewState("oMyFruit") , Fruit).Name
 
Is This Answer Correct ?    0 Yes 0 No
Satish V Itagi
 
 
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
what is CLR? PrimeLine3
About remoting and web services. Difference between them? Microsoft2
Where does Web.Config Info stored? Will this be stored in the registry? Accenture1
Life cycle of ASP.NET page when a request is made ? MMTS3
What?s a bubbled event?  1
how to add cliet side event to server side? and how to register client script to sever side? wt difference these two PSI-Data-Systems3
Any disadvantages in Dataset and in reflection ? DELL1
Diff B/W user control and server control  3
Can private assembly be used for more than one application? If so how? Satyam6
How many rules are there regarding a well formed XML document? a) Nine b) Three c) Six d) Two Syntax-Softtech1
You have two buttons in web form and i clicked on one of the button, so how do i find which button i've clicked on the form in my page load? INDUS14
In a webpage if i want to give access to only half page ,then what should i do?  3
What are validator? Name the Validation controls in asp.net? How do u disable them?  2
What are the two properties that are common in every validation control?  4
How do you bind array to gridview? Will it works? HP4
What is X-Path? Sherston2
what is difference between User Control,Custom Contro1,Web server control and template controls  1
what is the difference between this.controls and page.form1.controls and me.controls? FactorH2
what is .net Net-Solution11
i have one gridview contains edititemtemplate(which contains update and cancel buttons) and i have one item template (contains edit button) i want the code for update and cancelbuttons in edit item template and i want the code for edit button in itemtemplate. please help me  4
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com