Retrieve value of an asptextbox

M

Michael

I am using Web Developer Express 2005. I created a little form to add
some content to a database. I keep the formview default mode in the
insert mode. The values are being added to the database fine.

How do I retrieve a value of one of the textboxes and assign it to a
variable so I can pass it along to a new page after the insert event?

Thanks
 
H

Hans Kesting

After serious thinking Michael wrote :
I am using Web Developer Express 2005. I created a little form to add
some content to a database. I keep the formview default mode in the
insert mode. The values are being added to the database fine.

How do I retrieve a value of one of the textboxes and assign it to a
variable so I can pass it along to a new page after the insert event?

Thanks

If you want to "pass variables to another page", then a regular
variable is not enough: After a redirect to that other page all your
variables are cleared.
But this is a very common situation, so there is a common solution:
store the values in Session.

example in C#:

Session["MyValue"] = "Some Value";

string s = (string)Session["MyValue"];

Note: everything is stored as "object", so you need to cast to the
proper type.


Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top