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.0CascadingDropdown final postback problem.CascadingDropdown final postback problem.
Previous
 
Next
New Post
3/5/2008 2:19 AM
 

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 6:58 PM
 

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?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0CascadingDropdown final postback problem.CascadingDropdown final postback problem.


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