I ran my source code for the FitnessFrog app and the compiler said that the name 'Console' doesn't exist in the current context. What does this mean and why does this happen? I'll put the code below if it can be of help. class Program {
}
}3 Answersseal-mask STAFF Hi there! I received your request for assistance. Ben Reynolds is correct. You're going to need to change those slashes. But that's not why you're getting your current error. The reason you're getting your current error is that you've not included the namespace nor told it using System; namespace Treehouse.FitnessFrog { }Hope this helps! PLUS Two of the curly brackets got out of the code example itself - sorry about that. Please keep this in mind and don't think of it as a programming error! I did add those brackets to the code in my workspace. Xóa hết cácweb form đi làm lại từ đầu nên đã ok rồi. Nhưng mà vẫn không biết nguyên nhân của lỗi này là gì [IMG]images/smilies/biggrin.png[/IMG] Bạn không phải xóa những thứ đó, hãy thử làm như sau: Trong Form Login bạn hãy khai báo Username là public, như vậy bạn có thể truy cập trường này bất cứ trên Form nào với cú pháp như bạn đang làm.
Mình cũng bị lỗi tương tự, nhưng là "txtUsername" không nhận trong sự kiện kích vào nút đăng nhập , google thì tìm ra bài này, website mình dùng 8 webform, thêm mấy webform có sẵn của asp.net login,register,about. Mình làm 7 webform thì nhận được hết, nhưng tạo ra webform thứ 8 thì báo lỗi "txtUsernam" does not exist in the current context". Ban đầu mình cũng xóa hết, làm tới webform thứ 8 thì lại bị như cũ, cuối cùng mình xóa mấy webform có sẵn đi, thì được, mình không hiểu nguyên nhân là gì? Hay là do nhiều webform quá nên nó không nhận. Có ai biết nguyên nhân lỗi này không? [IMG]images/smilies/icon_question.gif[/IMG] -
|