English 中文(简体)
未在内容页上进行服务器控制
原标题:jquery not working on server controls in content page

i 在内容页上有一个文本Boxt。 一、审判

$(function(){
$("#txt").focus(function(){alert("abcd"); });
});

它没有工作。 如果在一页上使用,没有主页,它就会工作。

最佳回答

浏览超文本来源。 我认为,最可能的问题是重新命名控制,预先搁置内容部分。 您可以与客户登记和登记中心财产改变这一状况:

<asp:TextBox ID="txt" runat="server" ClientIDMode="static"/>
问题回答

<#txt> is an <asp:text Box /> 如果该网页上台,它将得到客户的控制,以选择一个星面控制需要做的星号$“[id*=txt]”





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

热门标签