asp.net mvc 5 - How to create cshtml file automatically? -
i'm using mvc 5 , want create cshtml file automatically forum.
i have created page allow user posting new thread. when user submits, data textarea , insert database. have done control.
my question is: how create cshtml file load data database , display automatically?
example: post new thread title is: here title. when click submit, converted <a href="/newthread/here-is-my-title">here title</a>
that mean: controller newthread , view here-is-my-title.cshtml had been created successfully.
can tell me how that?
p/s: hope question. thank you!!!
if u use entity framework model....u dont need create cshtml file ...it created automatically follow steps 1. right click controller 2. goto add controller 3. choose "mvc5 controller views using entity framework" there u can automatically create controller , view
Comments
Post a Comment