Can anyone talk with me about using buttons on an ASP.NET Page to insert a record?

I have two buttons on a page, that need to submit 1 record at a time, but with different results.

I'm having an awful time with it.

When the page loads, I click Button1, and nothing inserts.
> if I click button 1 again, the correct record inserts
>if i then click button 2, it inputs the same string as button 1 again
> if i click button 2 again, it now inputs the 2nd string correctly.

When I flop between buttons, that's when it gets messy, but if I stay on the same button, the string is correctly inserted

Can anyone visit this with me?

I'm using VB.NET Code

Recommended Answers

All 2 Replies

please post your code.

Remove the control initialization code from page_load or page_init method. Show us your code please.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.