Click here to Skip to main content
15,903,856 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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.
Posted
Comments
kedar001 21-Jan-14 7:37am    
Please elaborate..
Post code snippet
Bojjaiah 21-Jan-14 7:38am    
can you post your code?

Please verify weather it postback or not if yes check weather database connection string, update query was correct or not
 
Share this answer
 
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.
 
Share this answer
 
Hello,

As you said:
Quote:
button click not working


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

XML
<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

Quote:
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.


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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900