0

Hello I have two files

test.aspx
test.aspx.cs

I have some Drop Down Lists and Textboxes but if I want to use them the .cs file does not recognize there are those elements in the aspx file.

For instance, in the page load event I want to get the text from a textbox, the thing is that when I right textbox1.text visual studio does tells me that the control does not exist in the current context.

The strange thing is that if I double click the textbox it automatically creates the event in the .cs file.

Why does visual studio does not recognize the controls in the aspx file?

Thanks in advance.

1
Contributor
1
Reply
4
Views
6 Years
Discussion Span
Last Post by MrCapuchino
0

Ok, I fix that, now visual studio recognizes all my controls and I finished the new aspx file that I want to add to my website, the thing is that when I try to access the file it gives me this erro:


Compiler Error Message: CS1061: 'ASP.conf_aspx' does not contain a definition for 'btnShow_Click' and no extension method 'btnShow_Click' accepting a first argument of type 'ASP.conf_aspx' could be found (are you missing a using directive or an assembly reference?)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.