怎么样接收上一页的ID?!!急.........

elover2000 2003-10-21 07:51:42
我用的是ACCESS数据库

通过这个语句把ID传给后一页:
<a href="#" onClick="javascript:window.open('selectpro.aspx?ProductId=<%#DataBinder.Eval(Container.DataItem,"id")%>','popuge', 'toolbars=0">
[.<asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "id") %>'/>..订.购..]</a>

接收后提示说我的语句错了
请问应该怎么改?!!
mycommand=new oledbDataAdapter("select * from project where id='"+Request.form("id")+"'",conn)
...全文
41 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
elover2000 2003-10-21
  • 打赏
  • 举报
回复
windofcity(三十七度半) 谢了
Hilltown 2003-10-21
  • 打赏
  • 举报
回复
问一下,<a href="#" onClick="javascript:window.open...>中a href="#"是什么意思?
windofcity 2003-10-21
  • 打赏
  • 举报
回复
'selectpro.aspx? ProductId =<%#DataBinder.Eval(Container.DataItem,"id")%>
因为你这里是传的ProductId呀!这里改成id就用id,多看一下ASP的基础吧!
elover2000 2003-10-21
  • 打赏
  • 举报
回复
为什么一定要改成ProductId
liuzhonghe 2003-10-21
  • 打赏
  • 举报
回复
mycommand=new oledbDataAdapter("select * from project where id='"+Request.QueryString("ProductId")+"'",conn)
elover2000 2003-10-21
  • 打赏
  • 举报
回复
数据库里的字段名就是ID
不是什么PRODUCTID
saucer 2003-10-21
  • 打赏
  • 举报
回复
what error messages did you get?

are you sure the the data is being bound? can you look at the HTML source about this part?

<a href="#" onClick="javascript:window.open('selectpro.aspx?ProductId=<%#DataBinder.Eval(Container.DataItem,"id")%>','popuge', 'toolbars=0">
[.<asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "id") %>'/>..订.购..]</a>
suguanqun 2003-10-21
  • 打赏
  • 举报
回复
"id"->"ProductId"
elover2000 2003-10-21
  • 打赏
  • 举报
回复
改为Params还是一样啊!
saucer 2003-10-21
  • 打赏
  • 举报
回复
do you mean ProductId?


mycommand=new oledbDataAdapter("select * from project where id='"+Request.Params("ProductId")+"'",conn)

62,025

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧