One of those annoying type of of problems

shadowskull

Member
Joined
Apr 17, 2002
Messages
10
Location
Waldorf, Md
:-\This is probably the most annoying problem I have run into so far, and it is unfortunately more difficult to explain, but Ill do my best!


I am creating a web app in VB.Net. The problem is this, I need to obtain the text from a text box that I had edited to pass into my update query, however it grabs the original text instead. I figure this is because it is databound that I cannot use "string = textbox1.Text". What do I do to obtain the text w/ the changes?

:rolleyes:
 
:o Hi All,

I remembered reading that you need to let everyone know should you solve the problem on youre own. This was a solution that eluded me for a few days now, one that I even went to the chat room last night for.

The solution is this....

In the pageload event of the form, I must first check for post back (the IsPostBack boolean) before I bind the controls, otherwise, the controls get set to the original value, and this value is what gets placed as the value that gets passed into my function(s).

For anyone thats new to VB.Net, this happens because you will notice that the page gets loaded every time you click a button of any sort.

:D

:rolleyes:
 
Back
Top