form to database asp.net web application with VB

Hi Everyone,

I have written several vb applications that interface with our advantagedatabase, but I am currently working on MY FIRST asp.net web application. I need the user to answer a few questions and click my submit button. Once the button is clicked I need to send the information on the form into a table on my database. I would rather not use access. I have an older sybase database and I know how to talk with it fine in a standard vb app. I guess im just not sure how vb works with asp.net. I have created the page already. If i go to my design view I can add controls. If i double click on the controls it takes me to the vb code. However if i write code for those controls, it does nothing on my web app when I run it. If i go to my asp.net source code it also has the controls coded. I would like the submit button to be able to start my vb app which would pull all the info into my vb function and submit it to my database.

I have not actually started connecting to the database because I am confused on just basic funtionality between asp and vb. for example... I tried entering code where if you click submit one of the text boxes text changes. It does not work.. or If i changed the selection of a radio button through the code it would not work.. below is the template for both the asp and the vb.

Here is my asp code and below under the line is my vb code.... I f i try to type any code for my submit button on the vb code it will not execute in the web app

If this is your first asp.net application perhaps there are somethings you need to know: (if you know it already, please forgiveme)

1.- The vb.code executes on the Server not in the client
2.- Each time you click on a button the page make a post and returns to the Server to executes the code for that button
3.- Every time the page return to the server runs the PAGE LOAD event, so if you have code there that asign values to the Textboxes this will discard the changes made by the user, so you have to check if its the first time the page is rendered or if is a Post event called by the user (cliking a button for example)

OHHHH! I think I get it... So basically.... The user will not see the text box text change.... but it does change it on the server? so my code looks ok i just need to program the vb part like I normally do?

Well the User will see the changes AFTER the pages executes all the code, so, let say the user enter his email in TextBox1, when click Submit button, the email entered by the users goes to the server and in the PAGE LOAD event you can see that value, if there is no code in the PAGE LOAD event that change the TextBox1 text property, it will execute the code in the BUTTON1_CLICK event, here you can still see the email entered by the user, if in this event you have this code

TextBox1.Text = "Text Added in Codebehind"

when the page reloads, the users will see "TEXT ADDED IN CODEBEHIND" instead of the email he entered before, but, if you do not have code that changes the TextBox1 text property, when the pages reloads the user will see the same email he entered