executing client side code from code behind.

G

Guest

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
 
G

Guest

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top