作者:手浪用户2602916293 | 来源:互联网 | 2023-09-07 10:22
Aspartofmysharedlayout,Idliketohaveamodaldialogcomeuponabuttonclick.作为我的共享布局的一部分
As part of my shared layout, I'd like to have a modal dialog come up on a button click.
作为我的共享布局的一部分,我想在点击按钮时出现模态对话框。
This is the my partial view with the modal dialog:
这是我对模态对话框的局部视图:
Script
And the partial view's controller:
局部视图的控制器:
public class SettingsController : Controller
{
public ActionResult _Settings()
{
return PartialView("_Settings");
}
}
What I'm going for, is to have a button at the top of the page as part of the shared _Layout. Similar to this:
我想要的是在页面顶部有一个按钮作为共享_Layout的一部分。与此类似:
When I click the 'Settings' button, a modal dialog is supposed to come up, but when I click it now, the screen just goes dark, and I can sort of hint the modal dialog in the background. I'm not sure where in the modal I've done something wrong. Any hint is appreciated!
当我点击“设置”按钮时,会出现一个模态对话框,但是当我现在点击它时,屏幕就会变暗,我可以在后台提示模式对话框。我不确定在模态中我做错了什么。任何提示都表示赞赏!
1 个解决方案