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.0Postback not workingPostback not working
Previous
 
Next
New Post
1/22/2009 1:48 PM
 

My module appears to be reloading with each button click instead of doing a postback.  Textbox values are re-set to their initial load values.  At first I thought it was my code but I finally resorted to using a very basic book example to see if it worked and it doesn't work either.  So now I think it must be some DotNetNuke setting somewhere that's causing the module to reload instead of doing postback.  In the sample code, you should be able to click the "change message" button and the text boxes will get changed upon postback.  In my case however, they remain the initial values.  In fact, if you type something else in the text boxes and click the button, they are reset to the initial "hello world" values. Any help is greatly appreciated.  Here's the errant code:

 

 

@ Control language="vb" Inherits="Intura.DNN.Modules.Licensing.Licensing" CodeBehind="Licensing.ascx.vb" AutoEventWireup="false" Explicit="True" %> script runat="server"> Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click"Goodbye everyone"

lblMessage1.Text =

"Goodbye everyone"

txtMessage.Text =

"Goodbye everyone"

txtMessage1.Text =

"Goodbye everyone"

 

</

<

 

End Subscript>asp:panel id="panel1" runat="server"> <asp:Label runat="server" ID="lblMessage" Enablev13wstat3 ="true"

 

Text="Hello World"></asp:Label>

 

 

<asp:Label runat="server" ID="lblMessage1" Enablev13wstat3 ="false" Text="Hello World"></asp:Label>

 

 

<asp:Textbox runat="server" ID="txtMessage" Enablev13wstat3 ="true" Text="Hello World"></asp:Textbox>

 

 

<

<

<

</

<asp:Textbox runat="server" ID="txtMessage1" Enablev13wstat3 ="false" Text="Hello World"></asp:Textbox>br />asp:Button ID="btnSubmit" runat="server" Text="Change Message" ></asp:Button><br />asp:Button ID="btnEmptyPostBack" runat="server" Text="Empty Postback"></asp:Button>asp:panel>

 

 

 

<

 

<%

 

lblMessage.Text =

 
New Post
1/22/2009 5:46 PM
 

make sure you have the cache time on the module settings set to 0 (if the module works when you're logged in as admin/host, this is the problem as caching is disabled during admin/host use)

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
1/22/2009 7:02 PM
 

Thanks for your reply.  I set Default Cache Time to zero on the Edit Module Definition screen and it made no difference.  Also, I have similar custom module installed several years ago that's working fine.  It's just this one that I just installed where I have the problem.  Which is why I thought there might be a DNN module-level setting causing the problem.  Or maybe something I did wrong with the installation package.  Any other ideas?

 
New Post
1/23/2009 12:02 PM
 

sorry, doing a lot of c# lately, so mised this. In your declaration  you have AutoEventWireup="false" , so it means vb.net will not automatically wire up event handelers, you may need to add declaritive event to the button i.e

change

asp:Button ID="btnSubmit" runat="server" Text="Change Message"

to

asp:Button ID="btnSubmit" runat="server" Text="Change Message" onClick="btnSubmit_Click"

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
1/23/2009 12:07 PM
 

Your suggestion fixed the problem!  Yesterday I set the cache time to zero on the module definition which didn't help.  But today I found where you can set the cache time on the page module and that corrected the problem.  Thanks a lot!

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Postback not workingPostback not working


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