Click here to Skip to main content
15,560,618 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hi guys,

I am learning mvc, I created mvcdemo application and created employee controller,model as well view. I am got employee details from sql server also.

here when I go to .cshtml file I opened VS Toolbox there is no server controls are visible, only html controls are there.

why server controls are not visible? Is there any rules or manually add or etc?

thanks.
Posted

1 solution

MVC is stateless so it not having any Server controls other than HTML controls.
you can find brief information about it here[^]
 
Share this answer
 
v4
Comments
U@007 6-Feb-14 4:29am    
hi sp, ok I agree with your answer if I want call server controls like chart etc. how can I do?
SP HINGU 6-Feb-14 5:14am    
you can use HTML Helper Class for that
Unlike Web Form controls, an HTML helper does not have an event model and a view state.Means just a method that returns a string.
SP HINGU 6-Feb-14 5:21am    
as per my under standing Server control means its properties, methods and events can be accessed from server-side code. but it can't posibble in MVC because it is Stateless.
U@007 6-Feb-14 5:34am    
k thank you :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900