作为我以前一篇文章的后续(
ASP.NET MVC2 Master Page - Server side script not rendering, first bracket being escaped
这次是尝试动态设置用户控件的属性。
**对于熟悉N2CMS的人来说,它是高级寻呼机控件*
我正在做的是:
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.master" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage<Products>" %>
<%@ Register TagPrefix="AddOn" TagName="Pager" Src="~/Views/SharedParts/PagerControl.ascx" %>
<asp:Content ContentPlaceHolderID="Head" runat="server">
// content for head section
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<AddOn:Pager runat="server" ID="AdvPager" PerPage="<%= Model.ItemsPerPage %>" Total="<% Model.Count %>" />
</asp:Content>
有什么办法吗?我试着把整件事
String.Format
但那只是输出
<AddOn:Pager runat="server"...