Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

:-\This is probably the most annoying problem I have run into so far, and it is unfortunately more difficult to explain, but I'll 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:

Posted

:o Hi All,

 

I remembered reading that you need to let everyone know should you solve the problem on you're 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 that's 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:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...