我附上了一张图片,这是我的JQUERY MODEL DIALOG IMAGE。我想这样做,当我点击EditLinkButton,
我的DetailView控件与EditLinkButton的相关 e.CommandArgument 绑定。
页面不应回发
模型对话框应保持打开状态。
但目前发生的事情是当我点击EditLinkButton时,页面回发和模型对话框已关闭。
我怎样才能解决这个问题?任何想法或帮助将非常感激,因为我几天就陷入了这个问题,
我的代码:
function linkbtnTest(abc) {
$(abc).dialog({
title: "Shipment Status",
modal: true,
open: function (type, date) {
$(this).parent().appendTo("form");
},
closeOnEscape: true,
height: 800,
width: 800
});
}
MY DetailsView:
<div>
<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px">
<Fields>
<asp:BoundField DataField="InvoiceNumber" HeaderText="Invoice Number" />
<asp:BoundField DataField="InvoiceDate" HeaderText="Invoice Date" />
<asp:BoundField DataField="BLNumber" HeaderText="B/L Number" />
<asp:BoundField DataField="BLDate" HeaderText="B/L Date" />
<asp:BoundField DataField="VesselName" HeaderText="Vessel Name" />
<asp:BoundField DataField="VoyageNumber" HeaderText="Voyage Number" />
<asp:BoundField DataField="DueDate" HeaderText="Due Date" />
<asp:BoundField DataField="BLDate" HeaderText="BLDate" />
<asp:BoundField DataField="ContractedShipmentSchedule" HeaderText="Shipment Schedule" />
</Fields>
</asp:DetailsView>
</div>
MY StoredProc:
USE [KeyWin]
GO
/****** Object: StoredProcedure [dbo].[sp_Tbl_ShipmentStatus_Update] Script Date: 10/12/2012 11:33:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Abid Ali>
-- Create date: <3/10/2012>
-- Description: <sp_Tbl_Shipment_Update>
-- =============================================
CREATE PROCEDURE [dbo].[sp_Tbl_ShipmentStatus_Update]
-- Add the parameters for the stored procedure here
@ShipmentID int,
@LCStatusID int,
@InvoiceNumber varchar(50),
@InvoiceDate varchar(50),
@BLNumber varchar(50),
@BLDate varchar(50),
@VesselName varchar(50),
@VoyageNumber varchar(50),
@DueDate varchar(50),
@ContractedShipmentSchedule varchar(50)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
-- Insert statements for procedure here
update tbl_ShipmentStatus set LCStatusID = @LCStatusID,
InvoiceNumber = @InvoiceNumber, InvoiceDate = @InvoiceDate,
BLNumber = @BLNumber, BLDate = @BLDate, VesselName = @VesselName,
VoyageNumber = @VoyageNumber, DueDate = @DueDate,
ContractedShipmentSchedule = @ContractedShipmentSchedule
where ShipmentID = @ShipmentID
END
GO
答案 0 :(得分:0)
铅笔图标是一个元素吗?或只是一个点击事件的图像? 如果铅笔是一个按钮,你需要添加或
return false
或
`event.preventdefault()`
这是因为一个按钮使页面本身发布,因为它想发布一个表单。