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.0Add Dynamic controlsAdd Dynamic controls
Previous
 
Next
New Post
11/3/2010 5:34 AM
 
hi
I am developing a module .and want to create dynamic controls like wise we do in dnn profile;
i want to create a drop down  which will contains the controls name like text box, label,button....
if i select text box .and click on submit then the page should have one text box  if i select label then it should display one table

please guide me can i do this this in my module if yes so how??
 
New Post
11/3/2010 12:13 PM
 
You can add a placeholder to your module and as the user selects options in the dropdown you would build the control in the back end.  After you build the control add it to the placeholder (and make sure it does a post back to refresh the page).  There's probably an AJAX way to bypass the post-back, but I'm just learning AJAX so don't know yet. 

As a basic example in ASP the following would be in the change event for your dropdown where the user chooses the control type:

Dim obj as New Label
obj.Text = "This is my label text"
objPlaceHolder.Controls.Add(obj)

This assumes you have a placeholder on the page called objPlaceHolder.  Depending on what you are doing you may opt to clear any controls from the placeholder before you add the new one.  You could use an if to determine which type of control to create and set the properties you need.
 
New Post
12/29/2010 7:38 AM
 
Thanks Mike 
i will try this and also please tell me can i use password  fields and how can i encrypt the pass and steorein db
 
New Post
12/29/2010 11:28 AM
 
DNN already encrypts and stores user passwords in the database. There are many different ways to encrypt fields, just search on google and you'll see many many examples. Just remember, if you encrypt the fields (which you should do for passwords) you will need a decrypt function when people log in.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Add Dynamic controlsAdd Dynamic controls


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