Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...lost view_state after postbacklost view_state after postback
Previous
 
Next
New Post
9/7/2009 10:09 PM
 

Every control in .ascx file has a "Enableview_state" attribute, by default, it's ture and don't display. I think you would not modify this except touched it accidently.

But if you have any piece of code for initialing controls for you page, you should put these codes in this block to prevent controls being cleared at every round trip:

if(!IsPostBack)

{

.........Initial your controls..........

}

IsPostBack is a default property of ASP.NET page.

 
New Post
9/8/2009 2:55 AM
 

Yes of course you can store the content of form elements forexample using Sessions and load initial conditions in a  (!IsPostBack) event.  But the nature of framework doesn't need that effort by default..So why? Usual .NET forms does not require such an effort I mean. I can easily check my application for an accidental existence  of Enableview_state="false" by searching the phrase in whole solution using CTRL+F. And of course I've checked and found none of them!

 I have 257 different form element like dropdownlists, textboxes and event text property of buttons. That is nonsense! How can I initiate 257 different elements view_state? In a usual .NET form you put the elements on the form and don't worry about the view_state..Isn't it? Then where is the point DNN loses view_state? That problem is very elementary in Web Applications..

Thanks again..

 

 

 
New Post
9/9/2009 12:40 AM
 

Natively, ASP.NET program and DNN module supports storing view state automatically. So you don't need to worry about view state, just drop the control on the page and  write code for events, it's so weired your DNN module does not store view state. I think you can check your global setting for your DNN application or check whether other third party JS caused this problem.

 
New Post
9/9/2009 5:06 AM
 

Hi,

I confuse your initial problem loosing textbox content during postback (same page) or back forward browser button. Using CTRL+F blindly is not the good way to solve the problem.

 

 
New Post
9/9/2009 6:18 AM
 

Hi Iann,

I think I made you got wrong. CTRL+F is a shortcut of the find function in Visula Studio. You know, you can search some strings in 'current document' , in 'entire solution' forexample. I've searched for 'enableview_state="false" ' in my entire solution.Of course only text files. I don't know what is going on in core dll's of DNN..

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...lost view_state after postbacklost view_state after postback


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out