English 中文(简体)
删除Button问题
原标题:Delete Button issue

我将使用一个链接纽芬兰语,用于删除目的。 在确认书中,我添加了<关于Clientclick=“return ValidateOnDelete();的财产。 否则,它会做罚款。 但有一个条件是,当用户不管理时,删除的纽扣将残疾。 我的问题是,如果使用者在残疾时点击删除纽顿,就会发出确认信息。 如何避免这一问题?

最佳回答

将 but子通过至Validate OnDelete()功能

OnClientclick="return ValidateOnDelete(this);"

然后,在Validate OnDelete()职能范围内,对纽芬兰残疾人状况进行了测试。

function ValidateOnDelete(button) {
   if (button.disabled) return false;
}
问题回答

You could add the javascript on page load i.e Page.ClientScript.RegisterStartupScript(typeof({The Wep Page Namespace}), "{Your FunctionName}", "javascript text here", true)

Or create and hidden textbox with a flag Ie. And then during the page load set this to 1 if its an admin users

然后在您的javascript中提及这一盒子。

or add the attribute at page load i.e Button1.attributes.add["OnClientclick] = "return ValidateOnDelete();"

配偶





相关问题
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!

热门标签