Results 1 to 7 of 7

Thread: [RESOLVED] [02/03] Store Value of TextBox every second

  1. #1

    Thread Starter
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Resolved [RESOLVED] [02/03] Store Value of TextBox every second

    Hi Guys!

    How do you store the value of a textbox into a variable every second?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [02/03] Store Value of TextBox every second

    You don't need to, just access the value of the textbox. Why do you need it?

    And... Server side or client side?

  3. #3

    Thread Starter
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Re: [02/03] Store Value of TextBox every second

    I did it all in server side coding.

    Everytime I press the hyperlink button the value of the textbox is gone but I did store it in a global module.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [02/03] Store Value of TextBox every second

    I think you're going about it all wrong.

    Use an ASP.NET textbox control, set its EnableViewstate property to true. This way, any postbacks to the page will preserve the values in the textbox. No need to store it anywhere either.

  5. #5

    Thread Starter
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Re: [02/03] Store Value of TextBox every second

    Quote Originally Posted by mendhak
    I think you're going about it all wrong.

    Use an ASP.NET textbox control, set its EnableViewstate property to true. This way, any postbacks to the page will preserve the values in the textbox. No need to store it anywhere either.
    My textbox's EnableViewState property is already set to True. Ok, maybe I

    am doing it all wrong.

    How do you get the events of a button array?

    Thanks for the reply by the way.

  6. #6

    Thread Starter
    Hyperactive Member tommygrayson's Avatar
    Join Date
    Aug 2005
    Location
    In my Nissan Silvia
    Posts
    433

    Re: [02/03] Store Value of TextBox every second

    What does a Addhandler do? Maybe this colud solve my problem.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [02/03] Store Value of TextBox every second

    If you want to handle the events of many buttons,

    Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click, Button1.Click, Button2.Click

    Or you can use an Addhandler in the Page_Load event to dynamically assign them the event handler.

    However, this doesn't have much to do with maintaining the text in your textbox.

    It should work if you have EnableViewState set. Show code. The codebehind code as well as the ASP.NET code.

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