Ok i'll take a look at that site...
Meanwhile, take this example:
<script language="C#" runat="server">
protected void butTest_Click(object sender, EventArgs e)
{
lblTest.Text = txtTest.Text;
}
</script>
<form runat="server">
<asp:TextBox ID="txtTest" runat="server"></asp:TextBox>
<asp:Button ID="butTest" runat="server" Text="Button" OnClick="butTest_Click"/>
<asp:Label ID="lblTest" runat="server" Text=" "></asp:Label>
</form>
thats what i intend to do but i can't with DNN.
in the ViewMyModule.ascx file i have this:
<%@ Control language="C#" Inherits="YourCompany.Modules.MyModule.ViewMyModule" CodeFile="ViewMyModule.ascx.cs" AutoEventWireup="true"%>
<%@ Register Assembly="DotNetNuke" Namespace="DotNetNuke.UI.WebControls" TagPrefix="cc1" %>
<%@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/ModuleAuditControl.ascx" %>
<script language="C#" runat="server">
protected void butTest_Click(object sender, EventArgs e)
{
lblTest.Text = txtTest.Text;
}
</script>
<asp:TextBox ID="txtTest" runat="server"></asp:TextBox>
<asp:Button ID="butTest" runat="server" Text="Button" OnClick="butTest_Click"/>
<asp:Label ID="lblTest" runat="server" Text=" "></asp:Label>
Note: i removed the <form> tags because as far as i know DNN has a <form> tag already and we can't encapsulate them.
I also tried to put the protected void butTest_Click(object sender, EventArgs e) in the separate code file ViewMyModule.ascx.cs but the effect is the same.
The module loads fine but when i press the button the page refreshes and nothing else happens.
I would appreciate any help with this issue :)
Thanks in advance,
Tiago Costa