Hi,
If you first care to visit
http://www.absinto.org/form.html you can see just what I want to do in C#.
As you type in the login box, the email textboxes are automatically filled with the correpondent email.
Now, I'm working on this C# CMS website and on the register page, I need to do the same, but so far without success.
One of the problems is the the form name which I don't know what it is. The CMS is closed source. But there may be more than meets the eye.
Also, the register page can't have the part:
<html>
(...)
</html>
I get an error saying "Only content controls are allowed directly in a content page that contains Content controls".
After my signature is the way I've implemented the code in the .aspx register page.
Any help would be appreciated.
Warm Regards,
Mário Gamito
--
<SCRIPT type="text/javascript">
function update(val)
{
document.form1.Email.value
=val+"@foo
bar.com";
document.form1.Email2.valu
e=val+"@fo
obar.com";
}
</SCRIPT>
<div class="CommonFormFieldName
">
<XXControl:ResourceControl
runat=server" ResourceName="CreateNewAcc
ount_Usern
ame" />
</div>
<div class="CommonFormField">
<asp:TextBox id="Username" MaxLength="64" runat="server" columns="40" onKeyUp="update(document.f
orm1.login
.value)" />
<asp:RequireFieldValidator
EnableClientScript="false"
id="usernameValidator" runat="server" ControlToValidate="Usernam
e" Cssclass="validationWarnin
g">*</asp:
RequireFie
ldValidato
r>
</div>
<div class="CommonFormFieldName
">
<XXControl:ResourceControl
runat=server" ResourceName="CreateNewAcc
ount_Email
" />
</div>
<div class="CommonFormFieldName
">
<asp:TextBox id="Email" MaxLength="64" runat="server" columns="40" disabled />
<XXControl:ResourceControl
runat=server" ResourceName="CreateNewAcc
ount_Email
Descriptio
n" ID="Resourcecontrol16" />" />
<asp:RequireFieldValidator
id="emailValidator" runat="server" ControlToValidate="Email" Cssclass="validationWarnin
g">*</asp:
RequireFie
ldValidato
r>
</div>
<div class="CommonFormFieldName
">
<XXControl:ResourceControl
runat=server" ResourceName="CreateNewAcc
ount_ReEnt
erEmail" />
</div>
<div class="CommonFormFieldName
">
<asp:TextBox id="Email2" MaxLength="64" runat="server" columns="40" disabled />
<asp:RequireFieldValidator
id="email2Validator" runat="server" ControlToValidate="Email2"
Cssclass="validationWarnin
g">*</asp:
RequireFie
ldValidato
r>
<asp:comparevalidator id="compareEmail" runat="server" ControlToValidate="Email2"
ControlToCompare="Email" Cssclass="validationWarnin
g">*</asp:
compareval
idator>
</div>
Start Free Trial