如何编码多个提交按钮 [英] how to code multiple Submit buttons

查看:64
本文介绍了如何编码多个提交按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在做一个ASP前端。在这里,我有3个提交(按钮)[即 - 搜索列表,搜索联系人和搜索两者]在我的页面和一个文本框中。以及我想要的是什么 - 当用户在文本框中写一个名字并点击其中一个提交时,相关的ASP代码应该有效。


i想知道我如何查询不同的按钮。就像点击搜索列表一样,搜索只能通过我的数据库列表来进行等等......


如何对同一ASP代码中的不同提交按钮进行不同的编码页面。


谢谢

neha

hi

i am doing a ASP front end. here I have 3 submit (buttons)[namely-search list, search contacts and search both] in my page and one text box. well what i want is- when ever the user writes a name in text box and clicks on one of the submit that perticular ASP code should work.

i want to know how do i query for the different buttons. like if search list is clicked then search should happen only through list table of my database and so on.....

how to code differently for different submit buttons in the same ASP code page.

thanks
neha

推荐答案

只有在提交btn时才会发布即使在同一表格中有两个,也已被点击。这是一个快速测试脚本

A submit btn will only be posted if it has been clicked on even when there are two within the same form. Here''s a quick test script

展开 | 选择 | Wrap | 行号


感谢您的帮助

这段代码工作得很好.....但当我不得不从我的Ms Access数据库中检索数据时它不起作用。

i确保我的SQL查询是正确的,就像单个提交按钮时一样工作正常,并显示所需的数据。但有2个提交它显示我的所有数据而不是所选数据

neha
thanks for the help
this code works well like this.....but it dont work when i have to retrive data from my Ms Access database.
i am sure that my SQL query is correct as when with single submit button it works fine and displays required data. but with 2 submits it shows all my data and not the selected data
neha



感谢您的帮助

这段代码运行得很好......但是当我必须从我的Ms Access数据库中检索数据时它不起作用。

i我确定我的SQL查询是与单个提交按钮一样正确,它可以正常工作并显示所需数据。但有2个提交它显示我的所有数据而不是所选数据

neha
thanks for the help
this code works well like this.....but it dont work when i have to retrive data from my Ms Access database.
i am sure that my SQL query is correct as when with single submit button it works fine and displays required data. but with 2 submits it shows all my data and not the selected data
neha



你解决了这个问题吗?

Have you solved this?


这篇关于如何编码多个提交按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆