How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Steven Caliendo Your Own Question
Steven Caliendo
Steven Caliendo, Computer Software Engineer
Category: Computer
Satisfied Customers: 116
Experience:  Over 15 years professional experience as a software development engineer. 8 US Patents.
Type Your Computer Question Here...
Steven Caliendo is online now

re: Visual Studio Express for web 2012. I have two web forms

This answer was rated:

re: Visual Studio Express for web 2012.
I have two web forms and I want to copy text from form1, textbox 1, to form2 textbox 1 but I get "Textbox is inaccessible as it is protected". How can I unprotect these textboxes under a "Protected Sub" event handler
Kind regards
How/When are you trying to copy this text? (I mean like after form1 is navigated away from or when the other form is loaded)?

Best Regards,

Customer: replied 4 years ago.

Hi Steve, when the second form is loaded. If you go to you will see what I mean.

After the selection is made and submit is clicked, the thankyou form appears, but I want this thankyou form to contain a textbox with the email address entered on the first form textbox.

Ok. Programming a web site is somewhat different than a standard desktop app.

The reason that these things can't be shared is because the server, which is actually running the application, has no knowledge of what happened on the client when a new form is loaded.

You need to pass this information to the server so that it can be stored and used throughout all of your other forms and functions.

To do this with a web application, you can use session variables.

Before transferring to the second web form, store the information that you care about like this:

In your "Submit" button code, add lines like:

Session("TextICareAbout1") = Textbox1.Text
Session("TextICareAbout2") = Textbox2.Text

Then, on the form load of webform2, assign like this:

Textbox1.Text = Session("TextICareAbout1")
Textbox2.Text = Session("TextICareAbout2")

Try it out and let me know how it goes.

Best Regards,

Steven Caliendo and 5 other Computer Specialists are ready to help you
Customer: replied 4 years ago.

Thanks Steve, unfortunately I am going out for the evening so I won't be able to try until tomorrow.

I will contact you again tomorrow.

Many thanks


Ok, sounds good.

Best Regards,

Customer: replied 4 years ago.

Thank you so much steve, it all works fine. I have tried for hours to solve this problem, and you did it in 5 minutes.

Kind regards