vb.net session variable passing "space" from one page to another
Posted
by iuret
on Stack Overflow
See other posts from Stack Overflow
or by iuret
Published on 2010-02-05T02:09:49Z
Indexed on
2010/06/03
9:04 UTC
Read the original article
Hit count: 233
i have 2 aspx webpages with vb.net code. On the first page, I have a text box, on first page that says "Enter Hobby", but its not a required textbox. So if the user clicks submit, it'll load up the second page. Now in the second page i have textbox "hobby" which has maxlength = 10. and in the vb.net code i have hobby.text = session("hobby"). if the user doesnt fill up hobby in first page, the session comes with 10 "spaces" since maxlength is 10. I tried hobby.text = TRIM(session("hobby"), but nothing happens. Any idea how i can lose the spaces if nothing is inputted?
© Stack Overflow or respective owner