Help on data updates

  • Thread starter Thread starter Alamoni
  • Start date Start date
A

Alamoni

Hi, I'd like to be able to achieve 2 things but can't. Can someone help
please? I want to:

1. on the same web page, enter an amount then have some code to a)
decrease balance of 1st ac, and b) increase balance of 2nd ac.

Controls are using a formview with 2 x drop down lists (a/c # 1 and ac #2).
And a text field for the amount.

An Insert command saves these details to a sql table using sqldatasource.

I need help on vb code to compute this.

2. Problem 2 is after computation, update the a/c balances of 1st and 2nd.

thanks,

Paul
 
Hi, I'd like to be able to achieve 2 things but can't. Can someone
help please? I want to:

1. on the same web page, enter an amount then have some code to a)
decrease balance of 1st ac, and b) increase balance of 2nd ac.

Controls are using a formview with 2 x drop down lists (a/c # 1 and ac
#2). And a text field for the amount.

An Insert command saves these details to a sql table using
sqldatasource.

I need help on vb code to compute this.

2. Problem 2 is after computation, update the a/c balances of 1st and
2nd.

You have to communicate with the server. This leaves two basic options;

Web 1 - submit back to the server when a change is made
Web 2 - use AJAX to facilitate the postback and only paint the changed
portion of the page

You can accomplish the UI bits with javaScript alone, but that will not
save to the database until the user submits. This may be okay, but it
may not, as the form could be expected to auto update any changes
without a user pressing a button. You know better what you are
attempting here.

If this is a form where a person is editing a large amount of data, a
few fields at a time, AJAX might be preferable, as it facilitates
working without repainting the screen each time.

Regardless, you need to determine what will trigger the update.

If I were you, I would examine ASP.NET AJAX (www.asp.net/ajax) and go
through the demos. If the basic idea works for you, examine the code and
apply the AJAX controls, adapters, etc. to your application. You should
find plenty of sample code to work with on the site, as well as a few
videos explaining what is happening.

If AJAX does not work, there are also videos on standard ASP.NET on the
site. Find a sample that does basically what you are trying.

If you go the "traditional" route, you will probably need a button to
facilitate when the user is finished editing, as running a command on
edit can end up with multiple submits as a person types (ouch).

Peace and Grace,

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

My vacation and childhood cancer awareness site:
http://www.crazycancertour.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top