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.0Module developing and ID of controlsModule developing and ID of controls
Previous
 
Next
New Post
10/28/2008 1:20 PM
 

Hi all!

Developing a custom module for DNN, I have found that it changes all the ID of the controls I put in the ASCX; for example, an ASP Panel named "pnlOptions" becomes something like "dnn_ctrXXX_ModuleName_pnlOptions", where XXX is a progressive number. Is it possible to change the way DNN performs this operation?  I need to know this ID because I use it in some javascript code that I can't modify.

--
Marco Minerva, marco.minerva@gmail.com
http://blogs.ugidotnet.org/marcom

 
New Post
10/28/2008 1:22 PM
 

this is not a DNN feature but an asp.net feature. At the client you should not use the Id of a control, but the ClientId (ClientId is available at the server, you need to pass this to the client, you can use the DNN ClientApi for this)


Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
New Post
10/28/2008 3:04 PM
 

Another way to get at the ID is to use the following in a bit of javascript you include with your control:

var myControlId='<%=MyAspnetControl.ClientId%>'

In other words: you're creating JS that is being filled with parameters that only the ascx control knows as it is being pasted in place.

Peter


Peter Donker
Bring2mind http://www.bring2mind.net
Home of the Document Exchange,
the professional document management solution for DNN
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module developing and ID of controlsModule developing and ID of 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