Results 1 to 2 of 2

Thread: How to transfer parameters in a form in vb.net web application

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Location
    Shanghai China
    Posts
    20

    How to transfer parameters in a form in vb.net web application

    Hi,
    Do you know how to transfer parameters in a form in vb.net web application?
    I can do it by defining a global variable in the module,but I want to define a variable with the scope is in one form not globally.I have tried defining a variable in the form like following:
    '--------------------------------
    Public Class ProductGroup
    Inherits System.Web.UI.Page
    Protected WithEvents ImageButton1 As System.Web.UI.WebControls.ImageButton
    Protected WithEvents Label1 As System.Web.UI.WebControls.Label
    Protected WithEvents ddForms As System.Web.UI.WebControls.DropDownList

    public strTest as string
    '-------------------------------------

    But , after I set the value in one sub, I can't get the value of strTest in other sub.

    Can you help me?

    Thanks

    wu7up

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Location
    Shanghai China
    Posts
    20

    How to define Module-class varible in asp.net?

    Hi,
    I want to define module-class varibles in asp.net. These varibles can only be used when this web form is activate.
    I have tried session.("strID") , but this session varible can be accessed in the next web form if the session doesn't die.
    I also have tried defining a varible in aspx.vb file as well,just like defining form-class varibles in vb6. But every click will generate a new page and the value in the varible will be lost.

    How can I define a varible which will die when it redirects to another webpage ,and, it will not lose value when the web page itself refreshs?


    Thanks
    wu7up

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width