English 中文(简体)
页: 1
原标题:asp.net ensure javascript is loaded once only

我先在网上打字,而我则正在制作一个用户目录,视外部档案中的小片 j字而定。

我想能够提及用户议事录中的java稿,以确保该书装上页上,但问题是,用户议事录可以在一页上多次出现,因此我只想把该书装上用户代表大会的第一例。

在协会中,这样做是容易的。 NET Webform?

最佳回答

使用<代码>Client textsManager sRegisterClient texts()方法处理该问题。 在您的案例中,由于您从外部档案中转列了文字,请上http://msdn.microsoft.com/en-us/library/2552td66.aspx” rel=“noreferer”>>>><>RegisterClient textsInclude(>

另外,如果您重新使用更新文件,则使用<条码>。 页: 1

问题回答

如果你控制其内容,你也可以在联合材料档案中处理这一问题。

var myObj = myObj || {};  // Variable to namespace your work

// Make sure we do our work only once
if (!(myObj.token)) {

    // do our work here...

    myObj.token = {};  // this ensure we won t enter the if block the next time

}




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签