Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 22nd, 2012, 09:25 AM
Authorized User
Points: 353, Level: 6
Points: 353, Level: 6 Points: 353, Level: 6 Points: 353, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
Default .blur error

Hi Imar,

I'm sure your solution is the correct approach - I've known all along that this problem is tied up with losing focus on the email field and forcing it to lose focus before the user fires the create user button makes good sense.

However, now I'm feeling dumb again - can you suggest why I get this error?

Line: 123
Error: Unable to get value of the property 'blur': object is null or undefined

This happens before I put anything in the email field.

My code looks just like yours. Did you do something to enable this bit of script code? I put this in the head section but that did not help:

<script language="javascript" type="text/javascript">
</script>
 
Old April 22nd, 2012, 09:30 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Can you post the markup of your ASPX page?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 22nd, 2012, 12:57 PM
Authorized User
Points: 353, Level: 6
Points: 353, Level: 6 Points: 353, Level: 6 Points: 353, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
Default Markup

Hi Imar, thanks again for your interest - this is my page (there is no code behind)

Code:
 

 <%@ Page Title="" Language="VB" MasterPageFile="~/MasterPages/1Column.master" AutoEventWireup="false"
  CodeFile="SignUpTest2.aspx.vb" Inherits="SignUpTest2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
  <asp:CreateUserWizard ID="CreateUserWizard3" runat="server" ContinueDestinationPageUrl="~/Default.aspx"
    EmailRegularExpression='\w+([-+.&apos;]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*'>
    <MailDefinition BodyFileName="~/App_Data/SignUpConfirmation.txt" Subject="Your new account at xxx">
    </MailDefinition>
    <WizardSteps>
      <asp:CreateUserWizardStep ID="CreateUserWizardStep3" runat="server">
        <CustomNavigationTemplate>
          <table border="0" cellspacing="5" style="width:100%;height:100%;">
            <tr align="right">
              <td align="right" colspan="0">
                <asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext" 
                  Text="Create User"  onmouseover="document.getElementById('cpMainContent_CreateUserWizard3_CreateUserStepContainer_Email').blur();"           
                  ValidationGroup="CreateUserWizard3" />
              </td>
            </tr>
          </table>
        </CustomNavigationTemplate>
      </asp:CreateUserWizardStep>
      <asp:CompleteWizardStep ID="CompleteWizardStep3" runat="server">
      </asp:CompleteWizardStep>
    </WizardSteps>
  </asp:CreateUserWizard>
</asp:Content>
 
Old April 22nd, 2012, 03:09 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Dave,

Where do you get this error? In the browser? It works fine for me in all major browsers. Can you describe the steps to reproduce this?

When you look at the final HTML, is cpMainContent_CreateUserWizard3_CreateUserStepCont ainer_Email indeed the ID of that e-mail control?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 22nd, 2012, 05:52 PM
Authorized User
Points: 353, Level: 6
Points: 353, Level: 6 Points: 353, Level: 6 Points: 353, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 86
Thanks: 20
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by Imar View Post
is cpMainContent_CreateUserWizard3_CreateUserStepCont ainer_Email indeed the ID of that e-mail control?
Imar
Hi Imar,

You ARE the man! Correct again! The email control is:

ContentPlaceHolder1_CreateUserWizard3_CreateUserSt epContainer_Email

So "ContentPlaceHolder1" instead of "cpMainContent"

I'll test this with my hosted site also in a couple of days, but this seems like a very solid fix. I wonder why MS is not aware of this bug - and it is a bug.

I'll post this also on the thread on the MS ASP forum - no one there could figure out how to deal with this - I will certainly give your credit!

This dumb thing has sucked up many hours of time (mine, yours and others). I like the idea of the Wizard taking care of all the membership DB details, but this is always the problem when you encounter a bug in a piece of software over which you have little control - or need to be an expert like yourself!

So, thanks again and hopefully this is the end of this problem.
 
Old April 23rd, 2012, 04:10 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Ha, yes, my bad. I had to change the code to match my master page and forgot to change it back. Glad to hear this resolved the issue

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!




Similar Threads
Thread Thread Starter Forum Replies Last Post
Provider error by CreateUser dbardelt BOOK: Silverlight 4 Problem - Design - Solution 4 June 6th, 2011 08:21 AM
UserInformationService.CreateUser p115 Gabor66 BOOK: Silverlight 4 Problem - Design - Solution 1 May 14th, 2010 03:50 AM
wizard control Bill Crawley ASP.NET 2.0 Professional 0 July 12th, 2007 09:55 AM
CreateUser Error Gadall ASP.NET 2.0 Professional 1 May 9th, 2007 01:15 AM
Saving personalization properties w/CreateUser k8277 ASP.NET 2.0 Basics 0 April 5th, 2007 01:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.