English 中文(简体)
UpdatePanel with GridView with LinkButton with Value Causes Full Postback
原标题:UpdatePanel with GridView with LinkButton with Image Causes Full Postback

因此,这个问题可能是一个相当具体的问题,但我对我说是这样说的,因为在我能够确定原因之前,我花了几个小时与它打交道。

<asp:GridView ID="gvAttachments" DataKeyNames="UploadedID" AutoGenerateColumns="false" OnSelectedIndexChanged="gvAttachments_SelectedIndexChanged" runat="server">
    <EmptyDataTemplate>There are no attachments associated to this email template.</EmptyDataTemplate>
    <Columns>
        <asp:TemplateField ItemStyle-Width="100%">
            <ItemTemplate>
                <asp:LinkButton CommandName="Select" runat="server"><img src="/images/icons/trashcan.png" style="border: none;" /></asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>

在GredViewTemplate Field的项目中,我有一个内部形象的链接。 通常,当我有下一段文字的图像时,我就这样做了,但出于任何原因,我只是有自己的形象。 这使得更新小组总是完全退步。

最佳回答

你们不是改变标识,而是可以上网。

之所以如此,是因为客户信息数据库正在形成,更新小组进行登记的时间太长。 因此,客户信息数据库在中间进行拖网,这种控制将与未登记的控制一样处理。

For more information read the following: http://msdn.microsoft.com/en-us/library/system.web.ui.control.clientidmode.aspx

问题回答

将“联系邦”改为“形象邦”,这个问题已经解决。

<asp:ImageButton ImageUrl="/images/icons/trashcan.png" Style="border: none;" CommandName="Select" runat="server" />

解决办法也是行之有效的。 但 还有一点需要检查。 页: 1 如果失去亲子关系,你就会遇到同样的问题。

如果你组成标签如下(无补助),你将发出:

<form runat="server">
    <!-- your page markup -->
</form>

请补充说明如下:

<form id="form1" runat="server">
    <!-- your page markup -->
</form>

You will not need to update ClientIDMode in web.config or page or control. You will not need to change your linkbutton in markup. You will not need to register control for asynch postback from code behind.





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

热门标签