Hi,
I am using the Mavrick.net to develop one web
application. I found that the to "Mavrick.net Controller
classes" can not get value of textbox in the
UserControl.
The following is my code:
1. <mavrick.config>
.........
<command name="adduserAction">
<controller class="Web.ProcessFlow.UserAdd,
Logistics.Web"/>
<view name="success" type="redirect"
path="adduserok.m">
<view name="error" type="redirect"
path="errorMessage.aspx"/>
</command>
.........
2. Web Page
<%@Register TagPrefix="Logistics"
TagName="UserAdd"
Src="../Controls/useradd.ascx" %>
<html>
<body>
<form id="frmUserAdd" method="post" runat="server">
<Logistics:UserAdd id="adduser" runat="server"/>
</form>
</body>
</html>
3 Control Classes
<table>
<tr>
<asp:textbox id="txtUserName" runat="server"/>
.....
</tr>
</table>
4. Controller class Web.ProcessFlow.UserAdd
public class UserAdd :ThrowawayForm
{
protected string strUserName;
public string TxtUserName
{
set{this.strUserName = value;}
}
public voerride string perform()
{
Console.Write (this.strUsername);
return "success"
}
}
I debug code step by step and found the "public string
TxtUserName" method can not be executed. I think it is
one bug. Could you help me to solve it. Thanks a lot!
Zane (Zane.Zhang@pmgasia.com.cn)
Logged In: YES
user_id=1118698
it seems that mavnet fill class' all public properties which
match incoming http parameters (input field (expanded) ->
frmUserAdd:adduser:txtUserName; class property name ->
TxtUserName).
we have done a patch to standard edition of mavnet to do 2
things:
1) all incoming http parameters to extract last occourance of
`:' symbol -> therefore action handler will get `txtUserName'
parameter instead of `frmUserAdd:adduser:txtUserName'.
2) we have also ceated mapping mechanism like ->
`frmUserAdd:adduser:txtUserName' parameter maps really to
`TxtUserName' property (something like action handler http
parameter population).
is it clear ?