1

次のようなdbから文字列のリストを取得しています:

AddCustomer,
AddUser,
ListCustomer,
ListUser

これらは、asp ページのプレフィックスです。ページ内の特定のページを非表示および表示する必要があります。以下は、html スニペットです。

<li>Customer Management
                    <ul>
                        <%if (AddCustomer)  //how to check whether my string is present or not, is it possible?
                          { %><li><a href="AddCustomer.aspx">Add Customer</a></li><%} %>
                        <li><a href="ListCustomer.aspx">List Customer</a></li>
                    </ul>
                </li>
4

1 に答える 1

1

メソッドを作成して aspx ページから呼び出してみましたか?

<%# YourMethodName((string)Eval("AddCustomer")) %>
于 2012-05-31T10:09:49.483 に答える