简体   繁体   中英

Calling postback in asp.net programmatically

I am using spgridview with spgridviewpager in update panel. I need to postback using c# in aspx page. I used button field in the spgridview. When i clicked on the button field, i need to raise the postback event using c# or javascript.

Can any have an idea how to do it programmatically?

Since there are some quite good articles on the web explaining this, let me answer your question with a link:

转到button属性,您将找到回发网址..如果没有,则使用rowCommand获取button事件的发生

I think you can use triggers after the content template of update panel.

One more simple suggestion:

If you just want to cause a postback and to do nothing after postback, simply double click the button in the design view, you will get an onbuttonclick event generated in the code behind page. Don't write anything inside that button click event block. The page will get posted onclicking the button. If you want to implement something, write the code inside the button click event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM