Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error on Attributes.Add

Status
Not open for further replies.

FancyPrairie

Programmer
Oct 16, 2001
2,917
US
I have 2 text boxes on my page (TextBox1 and TextBox2). In the Page_Load procedure I have the following code:
Code:
        If (Not Page.IsPostBack) Then
            Me.TextBox1.Attributes.Add("onblur", "javascript:CallMe('" & Me.TextBox1.ClientID & "', '" & Me.TextBox2.ClientID & "')")
        End If
When I select "Start Debugging" I get the following errors:
Code:
error BC30456: 'TextBox1' is not a member of '_Default'
error BC30456: 'TextBox2' is not a member of '_Default'
However, if I click "Build Page" I don't get any errors. Why won't it build successfully via Debug?
 
Does the page compile or is this a runtime error..?

If it is just a small test page, I would delete it and start from scratch. Something weird may have happend when the page was created, or if you renamed it.
 
Compile time error. I will try rebuilding the page. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top