简体   繁体   中英

How to open cshtml page in an old cshtml page using c#?

I have a cshtml page that shows notes taken from a database in a grid. There is a createNote button that opens a pop-up where new notes can be added to the database. However, I don't want this to pop-up but to open in the same page as the grid. Can two cshtml's be combined, or should I make one cshtml containing both the grid and the add options, but only show the add options if the createNote button is clicked?

The best case would be to create a partial view and put all the new note related html + javascript inside it. And then include the partial view where ever you require.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM