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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Detecting VIEW or EDITDetecting VIEW or EDIT
Previous
 
Next
New Post
8/25/2009 3:02 PM
 

This seems like a basic question, but I can't seem to find the right answer.

I'm trying to use the same ascx file to handle both the VIEW and EDIT functions.  It seems foolish to create two files when there is literally ONE field that needs to be changed it EDIT mode.  I simply want to toggle between showing some text in VIEW mode, and showing a textbox in EDIT mode.

The problem is that I'm struggling to accurately detect the mode.  When I'm logged in as HOST, for example, IsEditable and me.EditMode are both TRUE all the time.  I can be looking at a Control of type VIEW or a control of type EDIT.  Doesn't matter.  Both say TRUE every time.

What am I missing here?  Short of looking at the query string and searching for ctl/edit, how do I tell whether I'm seeing a VIEW or an EDIT?

 
New Post
8/26/2009 10:41 AM
 

IsEditable references the ability for the user to edit the module.  (The permission on the module settings)

You can use IsEditable to determine if a user has permissions to edit, regardless of the control type.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Detecting VIEW or EDITDetecting VIEW or EDIT


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