I am trying to add content that gets updated with AJAX to my module and am having some problems. I have the basic functionality working but am getting undesired behavior when the enter key is pressed. Here is what I am trying to do and what I am experiencing.
The behavior I want is to have the page function just like it does when I press the button when the user presses the enter key.
The behavior I am seeing is that when I press enter, I am redirected to the home page of the site, the update function is not called.
I think this is because DNN wraps the module with it's own HTML that contains a form. I think this wrapping form is submitted instead of it causing my UpdatePanel content to be updated.
Here is the code for my AJAX Update Panel with some things stripped for simplicity:
<asp:UpdatePanel ID="myPanel" runat="server">
<ContentTemplate>
<asp:Repeater ID="myRepeater" runat="server">
<HeaderTemplate>
<div>
</HeaderTemplate>
<FooterTemplate>
</div>
</FooterTemplate>
<ItemTemplate>
<asp:TextBox ID="myTxt" Columns="3" runat="server" Text="" />
</ItemTemplate>
</asp:Repeater>
<asp:Button runat="server" ID="myUpdateButton" OnClick="myUpdateButton_Click" Text="Update" />
</ContentTemplate>
</asp:UpdatePanel>
I was seeing similar behavior with a non-AJAX form. I wrapped the non-ajax form with an <asp:Panel id="myPanel" runat="server" DefaultButton="myUpdateButton"> tag. This worked well but I am not sure how get the same behaviour using the <asp:UpdatePanel>. How do I make this happen?
Thanks
-"Look to the sky as much as the screen!"