开发者

Check Model in JQuery

I have a property on my model called CanExport. My view inherits this model like so:

<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Chatham.Web.Models.Indications.ModelBase>" %>

How do I in javascript, check if that property is true or 开发者_运维问答false?

Thanks!


You can use getAttribute

object.getAttribute('CanExport');


Ugh I'm so mad at myself. I put in code to do this and thought it didn't work which was why I asked the question, but I realized that I didn't build. Sorry!

Here's the code if anyone is interested:

var showexport = "<%= Model.CanExportHistory%>"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜