I created a LoginView in order to keep one button hidden from normal users, i.e not admins.
Works great but when I tried to add two more buttons – FileUploadControl and Upload button, I get an error that FileUpload1 does not exist. It definitely exists and I don’t get why it complains…
Do I need another LoginView or how can I do it?
Thanks
I suspect that you are trying to access the controls directly from the code behind as you would naturally do.
e.g.
On the .aspx page
In the code behind
However, you cannot access controls directly when they are within the
LoginView. You need to do the following. So if you had the control like this.You can access the fileUpload1 control like this
Then you can access the
fileUpload1properties.