按钮单击不起作用 [英] button click not working

查看:81
本文介绍了按钮单击不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i有两个网页,回家,编辑。

当我点击家中的按钮时,它会导航进行编辑,但是在编辑中,单击确定按钮它需要更新数据库,但它没有更新数据库。

我的查询是正确的(在工作台中测试)



问题是什么。

Hi,

i have two web pages, home,edit.
when i click button in home it's navigating to edit, but in edit , click OK button it needs to update the database ,but it's not updating the database.
my query is correct (tested in workbench)

what is the problem.

推荐答案

如果检查天气数据库连接字符串,更新查询是否正确,请验证天气是否回发
Please verify weather it postback or not if yes check weather database connection string, update query was correct or not


您好,

从这个角度来看,目前尚不清楚您到底在做什么。可能有很多场景,



1.如果您使用的是正常的aspx代码,请查看是否实际发生了回发(使用IsPostBack属性)。 br />


2.查看执行查询时是否发生任何错误。



3.如果是服务电话,请检查服务是否正在通话。



更好给出代码的一部分。很容易找到问题。
Hello,
From this point of view it is not clear what are you exactly doing. There could be a lot of scenarios,

1. If you are using normal aspx code behind, see if postback is actually happening or not (use IsPostBack property).

2. See if there is any error occurring in the execution of your query.

3. If it is service call, check the service is actually calling or not.

Better to give the portion of code. It will be easy to find the problem.


你好,



如你所说:

Hello,

As you said:
Quote:

按钮点击不工作





您需要确认那个:

所以你需要做一件事在按钮后面添加一个javascript代码处理程序:





You need to confirm that:
So you need to do one thing add a javascript code handler behind the button:

<asp:Button ID="but1" Text="clickme" runat="server" OnClientClick="alert('hi')" />





加载浏览器并单击按钮时,应显示警报。这确认按钮正常工作。





现在进入第二部分





When you load the browser and click the button an alert should appear. This confirms that the button is working.


Now coming to the second part

引用:

当我点击主页中的按钮导航进行编辑,但在编辑中,单击确定按钮需要更新数据库,但它没有更新数据库。

when i click button in home it's navigating to edit, but in edit , click OK button it needs to update the database ,but it's not updating the database.





您使用了哪种控件?你用什么技术/控制来连接数据库?

- 连接或不连接的数据访问?

- 如果你指定技术和控制我们可以工作多更好的。所以发布你的代码。

- 如果我很粗鲁,我道歉,但这会让图片更加清晰。





谢谢和问候,

- Rahul



Which control have you used? and what technique/control have you used to connect to the database?
- Connected or Disconencted data access?
- If you specify the technique and the control we can work much better on it. So post your code.
- I apologize if i am being rude, but this will make the picture more clear.


Thanks and regards,
- Rahul


这篇关于按钮单击不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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