Results 1 to 10 of 10

Thread: [resolved]asp.net communicate with client side objs

  1. #1

    Thread Starter
    Addicted Member jewel's Avatar
    Join Date
    Jul 2003
    Location
    truly asia
    Posts
    153

    [resolved]asp.net communicate with client side objs

    is it possible to make asp.net controls communictte a client side object? how? for example i have a button in asp.net then it will execute a vb script on the client side? i know asp.net is in server side but my application is a combination of both...

    is it possible?

    Thanks,

    Jewel
    Last edited by jewel; Aug 3rd, 2005 at 05:32 AM.
    xoxo

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: asp.net communicate with client side objs

    Does this help?

  3. #3

    Thread Starter
    Addicted Member jewel's Avatar
    Join Date
    Jul 2003
    Location
    truly asia
    Posts
    153

    Re: asp.net communicate with client side objs

    thanks this is a great article, i just browsed through it and it seems like the solution, still have to try it though..thanks a lot

    Jewel
    xoxo

  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: asp.net communicate with client side objs

    What about a simple Page.RegisterStartupScript and Page.RegisterClientScriptBlock?

  5. #5

    Thread Starter
    Addicted Member jewel's Avatar
    Join Date
    Jul 2003
    Location
    truly asia
    Posts
    153

    Re: asp.net communicate with client side objs

    hi registerstartupscript works but I don't know how to get the value of the variable inside the script from the code behind...

    Thanks,

    Jewel
    xoxo

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

    Re: asp.net communicate with client side objs

    Elaborate on what your requirements are. I am not sure what you mean by "value of the variable inside the script". When does this variable get set?

  7. #7

    Thread Starter
    Addicted Member jewel's Avatar
    Join Date
    Jul 2003
    Location
    truly asia
    Posts
    153

    Re: asp.net communicate with client side objs

    hi sorry my question was really messy...

    HTML Code:
    <script>
    var strValue;
    
    function PopWin()
    {
       strValue = txtVal.value;
    }
    </script>
    is there a way for me to get the value of strValue from code behind?
    xoxo

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

    Re: asp.net communicate with client side objs

    Assign what's in strValue to a hidden field on your page. Then you can use your codebehind to look at it. (Make sure that the hidden field is runat="server" and all that stuff)

  9. #9

    Thread Starter
    Addicted Member jewel's Avatar
    Join Date
    Jul 2003
    Location
    truly asia
    Posts
    153

    Re: asp.net communicate with client side objs

    thanks...

    got it to work...

    xoxo

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

    Re: asp.net communicate with client side objs

    Add [Resolved] to the thread title.

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