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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...UpdatePanelUpdatePanel
Previous
 
Next
New Post
10/14/2011 4:44 AM
 
Hi,

I'm currently building a module for DNN 6 using UpdatePanel.


<asp:UpdatePanel ID="updatePnl" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <fieldset>
                <legend>Panel with random names</legend>
                <br />
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
                    Text="Generate random names"
                    Width="200px" />
                <br />
                <div style="height: 35px; padding-top: 5px; padding-bottom: 5px">
                <asp:UpdateProgress ID="UpdateProgress1" runat="server"
                    AssociatedUpdatePanelID="updatePnl"
                    DisplayAfter="100" DynamicLayout="true">
                    <ProgressTemplate>
                        <img border="0" src="img/loading.gif" />
                    </ProgressTemplate>
                </asp:UpdateProgress>
                </div>
                <asp:Label Font-Bold=true ID="lblNames" runat="server" Text="">
                </asp:Label>
                <br />
                </fieldset>
            </ContentTemplate>
        </asp:UpdatePanel>

 private readonly string[] NAMES = new string[] {
    "Mark", "Tom", "Harry", "Sally", "Sandra", "Paul", "Anastasia" };

 /// <summary>
 /// This task is running 3 seconds pretending a long-running task
 /// </summary>
 private void FillListBoxRandom()
 {
  lblNames.Text = "";

  List<String> names = new List<string>();

  int count = NAMES.Length;

  for (int i = 1; i < 30; i++)
  {
   System.Threading.Thread.Sleep(100);
   Random rnd = new Random();
   int number = rnd.Next(count);
   string selName = NAMES[number];
   if (!names.Contains(selName))
   {
    names.Add(selName);
   }
  }

  foreach (string name in names)
   lblNames.Text += name + "<BR />";

 }
 protected void Button1_Click(object sender, EventArgs e)
 {
  FillListBoxRandom();
 }


This code works fine when i create a standard .net website for testing. But as soon as I put this into a module I always get a postback page reload which is not what I want. Does anyone know why UpdatePanel doesnt work with DNN.

Thanks
 
New Post
10/14/2011 4:58 AM
 
DotNetNuke works with update panels fine, in fact if you check your module control settings you'll see "enable partial rendering" - if that is enabled an update panel is injected on your behalf - this is the correct way to do this rather than adding your own updatepanels.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
10/14/2011 5:03 AM
 
Hi Cathal,

Thanks for your reply. COuld you give me an example of this? And where would I find "enable partial rendering" please?

Thanks,

Dane
 
New Post
10/14/2011 5:07 AM
 
http://www.google.co.uk/search?hl=en&biw=1600&bih=763&q=dotnetnuke+supports+partial+rendering&oq=dotnetnuke+supports+partial+rendering&aq=f&aqi=g1&aql=1&gs_sm=e&gs_upl=21180l22461l0l22692l9l7l0l0l0l3l171l860l3.4l7l0

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
10/14/2011 5:15 AM
 
Thanks for that.

I am unable to find Supports Partial Rendering to set it to true on my DNN installation. Where do I find this please?
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...UpdatePanelUpdatePanel


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