refresh sql reader

I have a reader I built using a programatic table with a update button.
I have a price field and a extended price, When I update the quantity the extended quantity field suppose to update.
This is in the storedprocedure. But the reader does not update physically on the client side, or show unless you hit the button twice, i tried ispostback not ispostback.
 Dim tb1 As New Button
 While sqlDR.Read

 Private Sub Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
   
LVL 9
Seven priceFull StackAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
Data readers are tricky in ASP.NET, and I can't see how you are really using it, and the question doesn't really make sense...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sybeCommented:
> But the reader does not update physically on the client side

Because the client receives static HTML. There is only a connection between database and generated HTML at the moment the HTML is generated. In order to renew the content, the client must do a new request to the server.
0
Seven priceFull StackAuthor Commented:
Dim conn As New SqlConnection
conn = New SqlConnection
0
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Seven priceFull StackAuthor Commented:
I triyed a new connection to server but still not effective
0
sybeCommented:
I am getting confused. You need to elaborate your question. Probably for you it is very clear what you ask, but for me it isn't.
0
Seven priceFull StackAuthor Commented:
Ok check this out, I have a update button with a text box programatically created.
When I enter a value into the text box and click the update button I have a price called extended price. That is suppose to give the total multiplyied by the quantity.
I just did another test and it is always one step behind. so if I update the text box 2 and click update the extendprice does not change but if I click the button again it then changes on the client side. On the back end it is updated after the first click.  first one click on from quantity 2 to 1ScreenHunter-03-Dec.-16-09.48.gif
0
Seven priceFull StackAuthor Commented:
0
sybeCommented:
Sounds like doing things in the right order: first update the database then pull the new data (and not vice-versa). But it is unclear how you are pulling data from the database.
0
Seven priceFull StackAuthor Commented:
thats ok its just a basic reader in a do while loop with a stored procedure connection open and cmd.
0
Seven priceFull StackAuthor Commented:
ooo
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.