简体   繁体   English

转发器中的LinkBut​​ton不回发

[英]LinkButton in repeater does not postback

I have a listing service I just hosted: www.listeratti.com; 我刚刚托管了一个列表服务:www.listeratti.com; on my testing server it works (local), but on the live server the linkbuttons on the repeaters on the home page do not work? 在我的测试服务器上,它可以工作(本地),但是在实时服务器上,主页上的中继器上的链接按钮不起作用? I do not know if its a framework issue or my code; 我不知道这是框架问题还是我的代码; can someone please look at the source for the page and guide me. 有人可以查看该页面的来源并为我提供指导。 Clicking a category on the homepage does not fire the events. 单击主页上的类别不会触发事件。

 <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl='<%# Eval("Category1", "~/ListResults.aspx?ID={0}") %>' CssClass="inrepeater" ValidateRequestMode="Inherit"><%# Eval("Category1") %></asp:LinkButton>

On the codebehind I'm binding data as such: 在后面的代码中,我这样绑定数据:

Repeater18.DataSource = dcv.Categories1.Where(x => x.ParentCategory == hdr.Header17).ToList();
            Repeater18.DataBind();

But if you click these; 但是,如果您单击这些; there's no event. 没有活动 Thanks in advance. 提前致谢。

IE throws the problem as: WebForm_DoPostBackWithOptions' is undefined. IE引发此问题,因为:WebForm_DoPostBackWithOptions'未定义。 How do I get around this? 我该如何解决?

Thanks a bunch to everyone who directed me; 感谢一群指导我的人; I discovered the problem was some js files in the master pages were missing; 我发现问题是母版页中的一些js文件丢失了; the references in the header section which are usually added by VS, for some reason, the js files were not in the site's folder; 标头部分中的引用通常由VS添加,由于某种原因,js文件不在站点的文件夹中; I have uploaded them and the clicks now work; 我已经上传了它们,点击现在可以了; I will reload the site and see how it goes. 我将重新加载该网站,然后看看它如何进行。 For anyone having this issue, simply start a new project; 对于遇到此问题的任何人,只需启动一个新项目即可; copy the files and WebForms folder from the Scripts folder and replace in your project; 从Scripts文件夹复制文件和WebForms文件夹,并在项目中替换; the script references will normalize and all will be well. 脚本引用将正常化,一切都会很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM