Updating SQL from table in web.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a table on my web page with text box controls in the cells.

When I add information to the table, I click on a command button that runs a stored procedure that inserts the information into my SQL Database.

The problem I am having is when I click on the command button, the page refeshes before in runs the command_click code and I loose all the information I typed in my table.

Can anyone help me out?

Thanks,


James
 
that's pretty weird. Can you post the code behind your button? When you
step through the code with the debugger, do you see your execute command
firing successfully? My first guess is that the code is wrapped in a
try/catch and an exception is being thrown but no notification is being
rendered. The code behind the button should execute before the PostBack,
that's what's getting sent back to the server.

Let me see the command_click and if you could, the form_load behind the
Page.IsPost back segment.

Bill

James Wood said:
I have created a table on my web page with text box controls in the cells.

When I add information to the table, I click on a command button that runs
a stored procedure that inserts the information into my SQL Database.
The problem I am having is when I click on the command button, the page
refeshes before in runs the command_click code and I loose all the
information I typed in my table.
 
I do not have the code with me. Here is the basis of how it works

I have a sign on screen that wrights info to a cookie
The second page ( the one I am having trouble on) will load the account info into text boxs from one query and a table from a second query

This is done in the page_loa

Under the command button click even
I have the code that is suppose add any new information added to the table

When I click on the command button, It runs the page load first, then runs the command_click event

Any thoughts?
 
Back
Top