I’m trying to use a Model with my Asp.net page. But im not using MVC. I get an error when trying to inherit the model from a customcontrol. The error is
ViewModel: interface name expected.
public partial class CustomControl : UserControl, ViewModel
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cant do multiple inheritance in C#.
UserControlandViewModelare both classes and you are only able to inherit from a single class.You can however implement as many interfaces as you like.