executing client side code from code behind.

Discussion in 'ASP .Net' started by =?Utf-8?B?QXNoYQ==?=, Aug 12, 2004.

  1. greetings, i want to populate a datagrid with data from the db and this
    requires a post back and code behind do its job.

    after the datagrid is being populated, i want the client side to execute
    some script based on the newly populated datagrid.

    does anyone know how to implement this? what i want is to execute the code
    behind 1st thenonly the client script. thanks people
    =?Utf-8?B?QXNoYQ==?=, Aug 12, 2004
    #1
    1. Advertising

  2. okay Asha this is how its gonna work.

    Dim jScript As String
    jScript = "<script> " & _
    "window.document.all.item('MainTable2').style.display =
    'none'; " & _
    "window.document.all.item('MainTable').style.width =
    '100%'; " & _
    "</script> "
    Me.Controls.Add(New LiteralControl(jScript))

    The ME.CONTROLS....... inserts the Script into the html page when the page
    is posted back. I used the above code to hide a table and change the width of
    another table.

    Adeel

    "Asha" wrote:

    > greetings, i want to populate a datagrid with data from the db and this
    > requires a post back and code behind do its job.
    >
    > after the datagrid is being populated, i want the client side to execute
    > some script based on the newly populated datagrid.
    >
    > does anyone know how to implement this? what i want is to execute the code
    > behind 1st thenonly the client script. thanks people
    =?Utf-8?B?QWJL?=, Aug 12, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guadala Harry
    Replies:
    4
    Views:
    1,498
    =?Utf-8?B?aGFyaSBwcmFzYWQ=?=
    Jun 15, 2004
  2. nick
    Replies:
    3
    Views:
    3,167
    Eliyahu Goldin
    Dec 15, 2004
  3. Boss302
    Replies:
    0
    Views:
    1,023
    Boss302
    Nov 21, 2006
  4. Bogdan
    Replies:
    2
    Views:
    639
    Bogdan
    Jun 9, 2008
  5. Zoe Hart
    Replies:
    1
    Views:
    354
    Scott Wisniewski
    Jan 8, 2004
Loading...

Share This Page