1

我是 VB .NET 的新手,如果可能的话,我想要像 Rails partials 这样的东西——可以在页面脚本中引用的 HTML 模板位,可能在循环中。我知道可能没有这样的事情。

4

3 回答 3

4

用户控制

于 2009-04-06T20:13:54.923 回答
1

Castle Project 是 ASP.NET / ADO.NET 的一个有趣的开源替代方案。此外,Castle Project 还为 .NET 提供了一个类似于 Rails 的开发框架。 http://jamescrisp.blogspot.com/2007/06/castle-project-rails-for-net.html

于 2011-01-28T17:51:46.300 回答
0

You can read html into a string, and spit it out with a placeholder / literal control. the function is like so:

Dim tmp as string = GetHtmlFragement()
Placeholder1.controls.add(New LiteralControl(tmp))
于 2009-04-07T00:57:40.967 回答