我目前正在构建一个 ASP.NET 应用程序。它应该非常简单。
问题是,我只体验过 asp.net mvc,对于这个应用程序,我仅限于 .net 2.0,所以没有 mvc。
唯一的要求就是这个。
我有一个包含大约 2000 条记录的表,其中包含以下列:
ID、代码 1(唯一)、代码 2(唯一)、姓名、姓氏、电子邮件。
该表已填充 Id、Code1、Code2。
现在,我们的想法是,当有人查找他们的记录(通过 Code1 或 Code2)时,他们可以填写其余字段(姓名、姓氏、电子邮件)。
所以,搜索->如果没有电子邮件、姓名、姓氏,则设置=>编辑=>显示
我需要什么?请帮忙。
我尝试过详细信息视图,但我不确定如何仅在电子邮件字段为空时允许编辑。
我还需要别的东西吗?
I am currently building an asp.net application. Its supposed to be pretty simple.
The problem is, I've only experience with asp.net mvc and for this app I'm limited to .net 2.0 so no mvc.
The only requirement is this.
I have a table of about 2000 records with these columns:
Id, Code1(unique), Code2(unique), Name, LastName, Email.
The table is already populated with Id, Code1, Code2.
Now, the idea is that when someone looks up their record (through Code1 or Code2) they are able to fill the rest of the fields (Name, LastName, Email).
So, search -> if no email, name, lastname set =>edit=>display
What do I need? please help.
I have tried Details View but Im not sure how to allow edit only if the email field is blank.
Do I need something else?
发布评论
评论(1)
我认为最简单的方法如下:
2 个文本框、1 个按钮(搜索)、1 个 GridView、1 个 SqlDataSource。
查看 ASP.NET Data 教程了解更多信息,请转到 本教程获取 GridView 更新帮助。
您可以一次编辑 1 条记录,我希望我能为您提供有关设置 Gridview 自动更新的更多详细信息,但自从我使用它以来已经有一段时间了(尽管 Google 应该帮助您解决此问题) )。
I think the easiest way to go is the following:
2 textboxes, 1 button (Search), 1 GridView, 1 SqlDataSource.
Check out ASP.NET Data tutorials for more info, got to Step 3 in this tutorial for GridView Updating help.
You'd be able to edit 1 record at a time, I wish I could give you more details on setting up the Gridview for automatic Updates, but it's been a while since I've worked with it (Google should help you with this though).