Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Salaro -- Skins and more
OnyakTech
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  CascadingDropdown final postback problem.
Previous Previous
 
Next Next
New Post 3/4/2008 11:19 PM
User is offline Patrick
24 posts
www.vaneechoud.nl
10th Ranked


CascadingDropdown final postback problem. 

Hi, i'm making a website with DNN and ASP.NET 2.0, and i made a CascadingDropDown with 3 dropdowns, where someone can select

- Continent
- Country
- Plant

When someone selects Continent the countries get loaded, then when someone selects country they get all the plants that exist in that country.
So far everything works, when someone selects a plant the ID of that plant needs to be submitted to another User Control with in the DNN page.

The asp.net code:

1    <%@ Control Language="C#" Inherits="COMPANY.DNN.PROJECT.Modules.PROJECTContactSelector.ViewPROJECTContactSelector"
2        CodeFile="ViewPROJECTContactSelector.ascx.cs" AutoEventWireup="true" %>
3    <%@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/ModuleAuditControl.ascx" %>
4    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
5    <div>
6        <cc1:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="ddlCriteria1"
7            Category="Criteria1" PromptText="Selecteer zoek type" ServicePath="~/DesktopModules/AJAXWebService/Locations.asmx"
8            ServiceMethod="GetCriteria1" />
9        <cc1:CascadingDropDown ID="CascadingDropDown2" runat="server" TargetControlID="ddlCriteria2"
10           ParentControlID="ddlCriteria1" PromptText="Selecteer een item" ServiceMethod="GetCriteria2"
11           ServicePath="~/DesktopModules/AJAXWebService/Locations.asmx" Category="Criteria2" />
12       <cc1:CascadingDropDown ID="CascadingDropDown3" runat="server" TargetControlID="ddlCriteria3"
13           ParentControlID="ddlCriteria2" PromptText="Selecteer een item" ServiceMethod="GetCriteria3"
14           ServicePath="~/DesktopModules/AJAXWebService/Locations.asmx"  Category="Criteria3"  />
15           
16   </div>
17   <div id="zoekContainer">
18       <div id="zoekDropdowns">
19           <p>
20               <asp:Label ID="lblIntroText" runat="server" resourcekey="lblIntroText"></asp:Label> <br />
21               <br />
22               <asp:Label ID="lblSearchCriteria" runat="server" resourcekey="lblSearchCriteria"></asp:Label></p>
23           <asp:DropDownList ID="ddlCriteria1" runat="server" />
24           <asp:DropDownList ID="ddlCriteria2" runat="server" />
25           <asp:DropDownList ID="ddlCriteria3" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlCriteria3_SelectedIndexChanged" />
26       </div>
27   </div>
28   

 The ddlCriteria3_SelectedIndexChanged code:

1     protected void ddlCriteria3_SelectedIndexChanged(object sender, EventArgs e)
2            {
3                try
4                {
5                    ModuleCommunicationEventArgs MCArgs = new ModuleCommunicationEventArgs();
6                    MCArgs.Sender = "ViewPROJECTContactSelector";
7                    MCArgs.Target = string.Empty;
8                    MCArgs.Value = ddlCriteria3.SelectedValue;
9    
10                   if (ModuleCommunication != null)
11                   {
12                       ModuleCommunication(this, MCArgs);
13                   }
14   
15               }
16               catch (Exception ex)
17               {
18                   Exceptions.ProcessModuleLoadException(this, ex);
19               }
20           }

  The catch code in the other DNN module:

1    public void OnModuleCommunication(object s, ModuleCommunicationEventArgs e)
2    		{
3    			if (e.Sender == "ViewPROJECTContactSelector")
4    			{
5    				BindData(Convert.ToInt32(e.Value));
6    				
7    				
8    			}
9    		}
10   

  



The BindData function is the actual function to write the information to the screen in another section on the website.  

1    private void BindData(int locationID)
2    		{
3    			try
4    			{
5    				PROJECTLocationInfoController objPROJECTLocationInfoController = new PROJECTLocationInfoController();
6    				PROJECTLocationInfoInfo objPROJECTLocationInfoInfo = objPROJECTLocationInfoController.GetPROJECTLocationInfo(locationID, System.Threading.Thread.CurrentThread.CurrentCulture.ToString());
7    
8    				lblLocationName.Text = objPROJECTLocationInfoInfo.Name;
9    				lblLocationStreet.Text = objPROJECTLocationInfoInfo.Street;
10   				lblLocationHouseNr.Text = objPROJECTLocationInfoInfo.HouseNr;
11   				if (objPROJECTLocationInfoInfo.AddressExtra == "")
12   				{
13   					lblLocationAddressExtra.Visible = false;
14   				}
15   				else
16   				{
17   					lblLocationAddressExtra.Visible = true;
18   					lblLocationAddressExtra.Text = objPROJECTLocationInfoInfo.AddressExtra + "&lt;br />";
19   				}
20   				lblLocationZipCode.Text = objPROJECTLocationInfoInfo.ZipCode;
21   				lblLocationCity.Text = objPROJECTLocationInfoInfo.City;
22   				lblLocationCountry.Text = objPROJECTLocationInfoInfo.Country;
23   
24   				if (objPROJECTLocationInfoInfo.Telephone == "")
25   				{
26   					lblLocationTelephone.Visible = false;
27   					lblLocationTelephoneFront.Visible = false;
28   				}
29   				else
30   				{
31   					lblLocationTelephoneFront.Visible = true;
32   					lblLocationTelephone.Visible = true;
33   					lblLocationTelephone.Text = objPROJECTLocationInfoInfo.Telephone + "&lt;br />";
34   				}
35   				if (objPROJECTLocationInfoInfo.Fax == "")
36   				{
37   					lblLocationFax.Visible = false;
38   					lblLocationFaxFront.Visible = false;
39   				}
40   				else
41   				{
42   					lblLocationFaxFront.Visible = true;
43   					lblLocationFax.Visible = true;
44   					lblLocationFax.Text = objPROJECTLocationInfoInfo.Fax + "&lt;br />";
45   				}
46   
47   				lnkLocationEmail.Text = objPROJECTLocationInfoInfo.Email;
48   				lnkLocationEmail.NavigateUrl = "mailto:" + objPROJECTLocationInfoInfo.Email;
49   
50   				lblLocationSurface.Text = objPROJECTLocationInfoInfo.Surface.ToString();
51   				lblLocationEmployees.Text = objPROJECTLocationInfoInfo.Employees.ToString();
52   			}
53   			catch (Exception exc) //Module failed to load
54   			{
55   				Exceptions.LogException(exc);
56   			}
57   
58   		}

 

The problem is when i run the BindData on page load then its going ok, when i debug the code all information is processed every field is filled.
But when everything is done no info is changed. I noticed a Async Postback being done after all information is processed.

I hope you guys can help me find the problem.

Kind regards,

Patrick

 
New Post 3/5/2008 3:58 PM
User is offline Hooligannes
1589 posts
www.nesinteractivos.com
5th Ranked






Re: CascadingDropdown final postback problem. 

Verify you don't have caching enabled, either for the module instance or in the module definition.


Do you know the truth when you hear it?
The Dúnadan Raptor
Check My Blog for DNN advice and more
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  CascadingDropdown final postback problem.
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


EMAS Pro
Strategic Enrollment Management Software for Higher Education Recruitment, Retention and Financial Aid
www.emaspro.com
Subzero Solutions
Dutch / English DotNetNuke consultancy services. Custom module development in any version. Complete application integration. Small business portal hosting. Your ideas our innovation - Your success our motivation. K.v.k Amsterdam: 34236342
www.subzero-solutions.net
Hosting for DotNetNuke
SiteGround.com is the best place to host your DotNetNuke website! Expert DotNetNuke support, reliable servers, low price!
www.SiteGround.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP