I maid two modules and publish both on one page.
Both modules have form and submit buttons. When I click on one of the button -- it is the same I submit two forms.
I submit two different forms by one click -- it is bad.
Is it my fault? Or it is a Cuyahoga specific?
Thanks.
It is not a problem with Cuyahoga, ASP.Net pages can only contain one form (and this one is specified in the template), there are some ways to use multiple forms (search for asp.net multiple forms on google), but it's all a bit of hacking. You should remove your forms from the module...and handle the posted data in de submit-button click event. Two submit buttons one one page shouldn't be a problem.
Efie, thank for your answer.
I have no any form teg in my modules.
Exemple of my simple module
%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Stamper.ascx.cs" Inherits="Cuyahoga.Modules.Stamper.Web.Stamper" %>
asp:Panel ID="Panel1" runat="server" CssClass="stamperform">
asp:RequiredFieldValidator ID="Validator" runat="server" ControlToValidate="StampedData"
Display="None" ErrorMessage="RequiredFieldValidator">
/asp:RequiredFieldValidator>
asp:TextBox ID="StampedData" runat="server" TextMode="MultiLine">
/asp:TextBox>
asp:Button ID="GetStamp" runat="server" OnClick="GetStamp_Click" />
/asp:Panel>
There is а asp:RequiredFieldValidator, and the form will not submit if asp:TextBox is empty...
If I have two asp:TextBoxs with asp:RequiredFieldValidator on one page -- user must to fill in both forms...
Is it possible have two asp:TextBoxs with asp:RequiredFieldValidator on one page?
And user can choose what asp:TextBox hi need to fill.
asp:TextBoxs are places in different Cuyahoga-modules.
Yes that's possible, the RequiredFieldValidator has an attribute called 'ValidationGroup' , submit-buttons do also have this attribute. This way you can group your validators together with the submit-buttons, and you can have multiple submit-buttons together with RequiredFieldValidators on the form.
So you have two modules where you can create different validationgroups (e.g. Module1ValidationGroup, Module2ValidationGroup), then it should work.-