开发者

vb.net session variable passing "space" from one page to another

开发者 https://www.devze.com 2022-12-19 19:10 出处:网络
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

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?


myString.Trim()

Ref.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号