编辑DB一行 [英] Editing a row in DB
问题描述
在我的radgrid控件,我使用有此编辑按钮编辑列表中的一个问题。当我点击编辑,它始终是
这是从获取QUES table..like它第一行数据总是第一个疑问句单击编辑按钮时得到填补
无论我所点击的问题的编辑按钮。我使用Telerik的radgrid控件因此无法通过CommandArgument编辑button..what是错的?
如果(e.CommandName ==编辑)
{
常见的COM =新通用();
INT32 ID = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues [e.Item.ItemIndex] [QuesID]的ToString()); 的Response.Redirect(HTTP://本地主机/ MyWeb即可/ +editques /+QuesID /+ QuesID +/+ PID);
} ALTER PROC [管理] [sp_Ques]
(
@QuesID BIGINT = NULL
)
如
开始
........
结束
您没有发出任何参数,你的 [管理] [sp_Ques]
键,因为它有一个默认空值,你没有得到任何关于它的错误信息或者
In my RAdGrid that I am using there's this edit button to edit a Question in the list. When I click on edit, it is ALWAYS the first row data that is fetched from Ques table..like it is always the first ques that gets filled when Edit button is clicked no matter what question's edit button I click. I am using Telerik's RADgrid so cannot pass CommandArgument to Edit button..what's wrong ??
if (e.CommandName == "Edit")
{
Common com = new Common();
Int32 ID = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["QuesID"].ToString());
Response.Redirect(http://localhost/myweb/ + "editques/" + "QuesID/" + QuesID + "/" + PID);
}
ALTER PROC [Admin].[sp_Ques]
(
@QuesID bigint =null
)
AS
BEGIN
........
END
You are not sending any parameters to your [Admin].[sp_Ques]
and since it has a default null value, you dont get any error message about it either
这篇关于编辑DB一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!