Why don't you do it from the server code by using ScriptManager.RegisterClientScriptBlock static method.
So first time you will call ScriptManager.RegisterClientScriptBlock to register "MyScript(1)" next time "MyScript(2)" and so on.
hello guys,
if i didn't get this wrong, you can also do something like that from the client side. you just need to handle the endrequest event of the client pagerequestmanager object.
This would be great, but doesn't seem to work. I tried this approach and it executed the first time, but not the second. Can just an updatepanel emit new script? I would think so, but I'd need to see a working example.
Luis Abreu:
hello guys,
if i didn't get this wrong, you can also do something like that from the client side. you just need to handle the endrequest event of the client pagerequestmanager object.
I can run a script on the client-side easily enough, but I don't know the updated parameter, and won't know it until the update panel is posted back. This is the conundrum.
hello.
from where do you get that value?
btw, and regarding the injection of the script from the server side through the static methods, you need to insure that the control you pass to the method is inside an updatepanel that is being updated.
Luis Abreu:
hello.
from where do you get that value?
btw, and regarding the injection of the script from the server side through the static methods, you need to insure that the control you pass to the method is inside an updatepanel that is being updated.
Thanks you! I was passing a reference to the entire user control that I'm writing instead of to a control inside the update panel itself. This solved my problem.
Brian
0 件のコメント:
コメントを投稿