如何使用c#在旧的cshtml页面中打开cshtml页面?
我有一个 cshtml 页面,显示从网格中的数据库中获取的注释。有一个 createNote 按钮,可以打开一个弹出窗口,可以在其中将新注释添加到数据库中。但是,我不希望它弹出,而是在与网格相同的页面中打开。 可以组合两个 cshtml,还是应该制作一个包含网格和添加选项的 cshtml,但仅在单击 createNote 按钮时显示添加选项?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最好的情况是创建一个部分视图并将所有新注释相关的 html + javascript 放入其中。然后在您需要的地方添加部分视图。
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.