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
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

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.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  CascadingDropdown final postback problem
Previous Previous
 
Next Next
New Post 3/5/2008 8:10 AM
User is offline Patrick
19 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

 
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.

 


Overlook Technology
Website Development, DotNetNuke Consulting, Module Development, Portal Management
OverlookTechnology.com
DeutschNetNuke = DotNetNuke in German
DeutschNetNuke provides all DotNetNuke related services in German (and English).
www.DeutschNetNuke.de
The Standard in Senior Housing Information
SNAPforSeniors provides consumers with free online resources to assist them with their search for senior housing
www.snapforseniors.com

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