Advertisement

06.11.2008 at 05:05AM PDT, ID: 23475358
[x]
Attachment Details

Insert JavaScrip effect on a C# .aspx page

Asked by angelsofgrace2006 in Microsoft Visual C#.Net

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+"@foobar.com";
    document.form1.Email2.value=val+"@foobar.com";
 }

</SCRIPT>

<div class="CommonFormFieldName">
  <XXControl:ResourceControl runat=server" ResourceName="CreateNewAccount_Username" />
</div>

<div class="CommonFormField">
 <asp:TextBox id="Username" MaxLength="64" runat="server" columns="40" onKeyUp="update(document.form1.login.value)" />
 <asp:RequireFieldValidator EnableClientScript="false" id="usernameValidator" runat="server" ControlToValidate="Username" Cssclass="validationWarning">*</asp:RequireFieldValidator>
</div>

<div class="CommonFormFieldName">
  <XXControl:ResourceControl runat=server" ResourceName="CreateNewAccount_Email" />
</div>
<div class="CommonFormFieldName">
 <asp:TextBox id="Email" MaxLength="64" runat="server" columns="40" disabled />
 <XXControl:ResourceControl runat=server" ResourceName="CreateNewAccount_EmailDescription" ID="Resourcecontrol16" />" />
 <asp:RequireFieldValidator  id="emailValidator" runat="server" ControlToValidate="Email" Cssclass="validationWarning">*</asp:RequireFieldValidator>
</div>

<div class="CommonFormFieldName">
  <XXControl:ResourceControl runat=server" ResourceName="CreateNewAccount_ReEnterEmail" />
</div>
<div class="CommonFormFieldName">
 <asp:TextBox id="Email2" MaxLength="64" runat="server" columns="40" disabled />
 <asp:RequireFieldValidator  id="email2Validator" runat="server" ControlToValidate="Email2" Cssclass="validationWarning">*</asp:RequireFieldValidator>
 <asp:comparevalidator id="compareEmail" runat="server" ControlToValidate="Email2" ControlToCompare="Email" Cssclass="validationWarning">*</asp:comparevalidator>
</div>

Start Free Trial
[+][-]06.11.2008 at 05:12AM PDT, ID: 21759106

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.11.2008 at 05:29AM PDT, ID: 21759267

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 02:03PM PDT, ID: 21764130

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual C#.Net
Sign Up Now!
Solution Provided By: unmeshdave
Participating Experts: 2
Solution Grade: B
 
 
[+][-]06.11.2008 at 02:06PM PDT, ID: 21764146

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906