【发布时间】:2015-09-23 11:57:42
【问题描述】:
基本上我有一个存储系统信息的数据库
- 系统 ID
- 系统名称
- 系统说明
- 系统路径
现在系统路径将由管理员填写与该系统相关的 aspx 页面的路径。
我的问题是,我的 SqlDataSource 表旁边是否可以有一个与我的数据库中的系统相关的按钮,单击该按钮将采用系统路径并转到它,所以如果您单击 System1 的“查看”按钮,您将定向到 ~/pages/system1.aspx
--- 错误 ---
[HttpException (0x80004005): Multiple controls with the same ID 'LinkButton1' were found. FindControl requires that controls have unique IDs.]
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +233
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +311
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +304
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +412
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +412
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +412
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +412
System.Web.UI.Page.FindControl(String id) +38
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +245
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1960
【问题讨论】:
-
你的问题能不能说的更清楚一些
-
请正确格式化问题..我们无法清楚地说明。
-
目前还不清楚您从这个问题中提出的问题。假设管理员填写的路径是用“系统路径”查询的,以检索具有该路径的所有系统是否正确?那么你到底需要这个按钮做什么呢?
-
@Harvey 基本上管理员将输入与该系统相关的 aspx 页面的路径,以便用户可以通过单击“查看”按钮访问系统页面
-
为什么你有多个按钮?您只需要一个名为“查看..”的按钮。用户可以选择记录以引用正确的“系统路径”
标签: c# asp.net database webforms