displaying textbox data from one form to other

srivalli

Well-known member
Joined
May 4, 2005
Messages
189
Programming Experience
Beginner
in vb.net,
if i want to pass textbox value from one for to other
i wrote the code as follows

in form one

public shared txt as textbox

in button_clk event

txt=textbox1
dim f as new form2
f.show


in form two

me.textbox1.text=form1.txt.text

its working fine

now i made both textboxes lin form1 and form2 modes as passwords in ASP.NET

then the value in the form1 textbox1 is not passed to lthe second form
now what can i do
thnks
 
If you're using ASP.Net to pass this to another page (more then once, like... UserID); assuming it's not overly sensitive data, use Session values. They can be intercepted with a "monkey-in-the-middle" attack, so don't store SSN, passwords, things of that nature.

If you don't care about the user seeing the data, use URL parameters. They're a one time shot (Session values follow you around from page to page until you drop them or exit) and easy to use.
 
Back
Top