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...Getting StartedGetting StartedOne Module - 2 Pages RecepieOne Module - 2 Pages Recepie
Previous
 
Next
New Post
11/21/2011 5:13 PM
 

Hello, I have created a module that has two .ascx controls. The first control checks if the user email cookie in null. If it's null, GetEmail.ascx control loads on a page and requests user email. The Submit button on this control takes the user to another page where DealSuccessful.ascx control displays a cuccess message to the user and stores the email on the client in a cookie. If the email cookie exists, the above ridirect happens right away to DealSuccessful.ascx functionality.

I am new to DNN and need some advice on how to accomplish that...in ASP.NET that would be a easy task - but here I need to learn how the DNN container works.

In particular, I would likew to know if this model will work and some practical explanation, links of how to accomplish that:

One Module - 2 ascx controls - 2 DNN pages. The page with the GetEmail control checks the cookie value and redirects to the page with DealSuccessful control.

I am aware of using two panels on one page but it will not work as there will be some page specific other modules like GoogleAnalytics that apply differently for the two page and I don't see if/how I can control that behaviour in a multiview scenario.

Thank you

s.

 

 

 

 
New Post
11/21/2011 7:54 PM
 

I personally would go with 3 ASCX files

1 that Loads the other 2 controls, have it do the checking of the Cookie, and then redirect the User to a different URL using a querystring parameter such as ViewControl=Email or ViewControl=Success

Using the NavigateURL method and passing in the TabId, along with the appropriate querystring parameter, will build out a unique URL and allow Google Analytics and other controls to still load on the page.

For an example, see my DNNSimpleArticle module

http://dnnsimplearticle.codeplex.com/

It has a Listing control that displays by default, or an ArticleDisplay control that loads if you click on a link in the listing and build a URL with an article id parameter.


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
 
New Post
11/21/2011 8:03 PM
 
Thank you Chris, sounds very clear for now. Sorry for some bad grammar in the post ;)
 
New Post
11/22/2011 11:03 AM
 
Chris, I opened the solution you recommended from codeplex - the DNNSimpleArticle, however I don't see the source code, only the markup and the binary.
I have started the work according to the design you suggested and would like to ask a few questions.

I have 3 ascx controls in my DealRequest module.
1. Controller. This control recieves a call from another control (outside DealRequest module) when the user clicks on a "Request a Deal" button.
2. RequestEmail. is redirected to by the Controller if ["Email"] cookie is not found on the client
3. DealSuccess. is redirected to by the Controller if ["Email"] cookie is not null

I have the three controls developed. Now I have to make them work in DNN - do some wiring. So I logged in to DNN. Could you provide me with a little direction from here?

1. Where do I place the Controller? How does the calling control on the DNN website knows how to call the Controller. Do I create a new page and put the Controller on a page with particular tabid and then have the calling control call navigateURL method from it's code with that page's URL?

2. Could you also elaborate on the proper URL building method that suits this solution? I am not familiar with DNN URL providers. Apparently, there are many ways of doing it. In our production I see strings like this

http://www.dealfinder.com/src/dealrequest?BusinessID=144&BusinessName=Canadian Tire

I have seen other looks online like

http://www.dnndaily.com/tabid/353/default.aspx
or
http://www.dnndaily.com/default.aspx?tabid=353

3. When the Controller makes the call to the appropreate control, why does it need to use a query string parameter? I understood that the page the redirect is going to has been determined by the logic of the Controller, so it knows exactly what page it is calling - no parameters required. Ex, call http://dealfinder.com/RequestEmail if the cookie is null or call
http://dealfinder.com/DealSuccess page if the cookie in not null.

Thank you.
s.
 
New Post
11/22/2011 4:15 PM
 

You can find the source package of DNNSimpleArticle on the downloads page

http://dnnsimplearticle.codeplex.com/...



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
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedOne Module - 2 Pages RecepieOne Module - 2 Pages Recepie


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