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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Postbacks Not WorkingPostbacks Not Working
Previous
 
Next
New Post
4/5/2009 7:24 AM
 
Hi! I have a simple situation that is NOT working. 1. I created a Private variable for my web user control for a custom DNN module 2. I set the @control Enableview_state property to True 3. At Page_Unload, I store the private variable into the view_state bag (stepping through the code at debug time, the storage actually takes place) 4. At Page_Load, I try to restore the private variable back from the view_state, HOWEVER when I trace through the code, the view_state bag does not contain the item. 5. The keys use to storing and retrieving values from the view_state are the same. I wonder if anyone else has gone through such experiences and have been able to implement successful postbacks in a DNN module. Thanks in advance.
 
New Post
4/5/2009 11:47 AM
 

Page_Unload would be too late in the page or control life-cycle to write to view_state. If I recall correctly, the PreRender event is the last chance to do so. While it may appear during debugging that your value is beeing written to the state bag,it would not actually get written into the hidden view_state field on the page. You would either have to save earlier to view_state or use some other mechanism such as writing to the DataCache with the appropriately specific key.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
4/6/2009 2:06 PM
 
Hello Bill, Appreciate you taking time to reply. I changed the codes so that the view_state is updated earlier. Specifically, I wrapped the Private variables with Property Gets/Sets and within the Property Sets, I set both the Private variables and the StateView item. That way, the StateView items gets updated early on. This does not work either. I checked the ASP.Net configurations on IIS, nothing there to provide any clue either. Also I precede my view_state key with the control name so that it is unique throughout the application (ie. no higher up or lower down controls overwrite the values). Finally, I solved the problem by creating my own invisible textboxes - these get state maintained across postbacks. As an advantage, I do not have to enable view_state which allows me to circumvent the performance issues associated with its escalating and uncontrolled usage. Not what I expected to have to be done though. Anyone else has a successful experience?
 
New Post
4/6/2009 5:27 PM
 

Are you able to hit breakpoints on your postback event? If not check to make sure you don't have caching turns on in the module settings for the module.


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Postbacks Not WorkingPostbacks Not Working


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