Javascript and Postback

G

Guest

Hello.

If i emit some JavaScript on an items databind, is it persisted if the page
does a postback and the ItemDataBound is NOT called?

Thanks,

JY
 
T

Teemu Keiski

Hi,

it really depends how you emit it. For example with a Literal control in the
repeating control (set js as text of literal control) and set when
data-binding, it would persist. But if you output it with
Page.ClientScript.RegisterStartupScript etc it wouldn't be there on the
next postback
 

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
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top