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.0Basic Module CreatingBasic Module Creating
Previous
 
Next
New Post
2/4/2008 7:50 AM
 

Hi,

 

I'm new to DotNetNuke and ASP.NET.

I installed a template to create modules in Visual Studio and i created a "blank module" successfully and added that module to the content pane on my portal page.

I'm trying to learn the basics of creating my module and i ask someone to post here a tutorial for a simple task:

I want a label, textbox and a button, which, when pressed, copies the text from the textbox to the label - i don't want to store anything in the database.

Is it possible and can you provide a tutorial?

Thank you for your time,

Tiago Costa

 

 
New Post
2/4/2008 11:49 AM
 

You can look at any basic asp.net tutorials to get that type of information, I would have a look at the tutorials available from 4guysfromrolla.com


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
2/4/2008 11:52 AM
 

You can learn from Michael's guides at: http://www.adefwebserver.com/DotNetNukeHELP/DNN_ShowMeThePages/Default.htm. Hope it helps.

 
New Post
2/4/2008 12:58 PM
 

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

 

 
New Post
2/4/2008 1:25 PM
 

I've read that tutorial but for now, i want to create a module that doesn't store data in the database.

 

I've noticed something odd... when i load the page the button just refreshes and doesn't work... as i stated before.

 

If i wait 1-2 minutes the button works as intended and stops working for the next 1-2 minutes and then it works again just once not working afterwards for 1-2 minutes and so on.

Is there an option in DNN that prevents the button event to trigger everytime it is clicked? allowing it to only work once every 2 minutes? is it there by default to prevent some kind of flood?

Or is it an option in web.config or my own browser?

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Basic Module CreatingBasic Module Creating


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