我有一个网格视图,大约有六列,其中一列是文本框。
用户可以在文本框中输入一个值,当他单击提交按钮(该按钮不在网格视图中)时,必须将单个值更新到数据库中。网格视图中的所有其他列都将从数据库中检索。但这一列必须更新到DB中。用户可以为此可编辑列输入一行或所有行(记录)的数据。
每当gridview中的文本框发生文本更改事件时,我都需要更新该特定记录的数据。
当编辑许多行时,请建议如何获得该特定列的值。
提前谢谢。
我有一个网格视图,大约有六列,其中一列是文本框。
用户可以在文本框中输入一个值,当他单击提交按钮(该按钮不在网格视图中)时,必须将单个值更新到数据库中。网格视图中的所有其他列都将从数据库中检索。但这一列必须更新到DB中。用户可以为此可编辑列输入一行或所有行(记录)的数据。
每当gridview中的文本框发生文本更改事件时,我都需要更新该特定记录的数据。
当编辑许多行时,请建议如何获得该特定列的值。
提前谢谢。
我只需要在每个文本框中添加一个onChange或onKeyDown方法,然后用JavaScript编写一个方法来只更新该字段。
<input type="text" id="myTextBox" onchange="$:someJavaScriptMethod()" />
如果您想在服务器端处理它,您可以订阅TextBox的TextChanged事件,但不需要返回TextBox帖子。当提交按钮执行回发时,将调用TextChanged事件的事件处理程序。在事件处理程序中,您可以将文本持久化到DB中。
In my webpages I have references to js and images as such: "../../Content/Images/"Filename" In my code if I reference a file as above, it doesnt work so i have to write: "c:/miscfiles/"filename" 1-...
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. ...
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 ...
I m looking for best practices here. Sorry. I know it s subjective, but there are a lot of smart people here, so there ought to be some "very good" ways of doing this. I have a custom object called ...
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 ...
i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...
For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?
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!