开发者

How to call javascript function as well as server side function on DropDownList Item changed

I have a dropdown. What I want is, when user changes the dropdown list item then to show image of loading and then to go server side and execute my OnselectedIndexChenged event.

But I am able to call only one at a time. If javascript call is successful then it is not calling server side.

I called j开发者_运维百科avascript through onchange event.

I tried with this


What you can do is, you can register the javascript on SelectedIndexChanged of combo.

Page.RegisterClientScriptBlock("ClientScript", script);

You can do whatevery ou want in your javascript and then call button.Click() at the end of your javascript. This button should run on server-side and shouldn't have any JS attached to it.

You can do whatever you want on that buttons click(code-behind). Remember to make that button invisible ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜