Greetings,

Can someone tell me on how can i call a certain textbox from web.aspx to another web.aspx

in visual basic windows form application we use

Me.lastname.text = Profile.lastname.text

what is the equivalent code in asp.net?

btw i'm using visual basic asp.net.

Thank you in advance guys :D.

Recommended Answers

All 4 Replies

you can't just directly play with values in 2 textboxes in 2 different web pages, unless 1 page calls the other directly, in which case you will be able to retrieve the info you want from the request object.

If the pages dont come directly one after another, you will need to save the value from the first page in either a session variable or a cookie, typicaly a session variable would be a good choice here.

Get started on this idea and come back with code if you have some issues :)

Thank you sir.

I have another question if it is ok sir.

I have a registration page,a profile page, and a page where all the registered user are displayed. Now, if i click a row in the datagrid on the registered user page it should open another web page that displays the selected user's data. My question is, Is the method on calling textbox from web page to another web page is the same as selecting a data from the database to display it on the user's profile?

My question is, Is the method on calling textbox from web page to another web page is the same as selecting a data from the database to display it on the user's profile?

When a user clicks on a row in the datagrid, you need for something to happen. For example, as Phipple explained, you either need to store the information in a cookie, session variable, or you can send the information via a querystring. There is no right or wrong...all depends on your scenario. The session is probably the best choice as you dont have to worry about querystrings (for example -->http://page.yourdomain.com/?user=jake20) and URL rewriting for SEO.

So you arent really calling a text box from to page. What you need to do is when a user clicks on a link, store the information using one of the methods described, then on the target page, retrieve the information and do something with it, like use it in a SQL query to get details about the user.

A great thanks to both of you i found a way to solve my problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.