问题描述
大家好,
i是MVC新手,
i我正在使用两个局部视图两个用户控件让它第一个和第二个,实际上它应该通过该URL从用户控件获取数据,具体取决于查询字符串。
问题是当我运行页面时,第一和第二部分视图显示相同的值(正好是第一个显示的)
@ Html.Partial(〜/ Views / Shared / _first.vbhtml)它将引用.ascx文件的URL
@ Html.Partial(〜/ Views /分享/ _second.vbhtml)
所以请给我一个解决方案,如果你需要更多,我肯定会
提前感谢
Velsamy A
hi everyone,
i am new to MVC,
i am using two partial view s for two user controls let it be first and second, actually it should fetch the data from the user controls through that URL depending upon the query string.
problem is while i run the page, both first and second partial view displaying same value(exactly what first one shows)
@Html.Partial("~/Views/Shared/_first.vbhtml") it will refer the .ascx file's url
@Html.Partial("~/Views/Shared/_second.vbhtml")
so give me a solution please, if you need more , sure i will
thanks in advance
Velsamy A
推荐答案
这篇关于如何在Mvc 4 Razor Html中创建多个局部视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!