Server button in Repeater and repeater server button

Source: Internet
Author: User

Server button in Repeater and repeater server button

Protected void button#click (object sender, EventArgs e)
{
Button btn = sender as Button;
Response. Write (btn. CommandArgument. ToString (); // transmit the button parameters at the front end.
}


How to trigger the Click Event of the ImageButton or Button or LinkButton Server Control in the Repeater control?

I only used an Html control to trigger the OnClick event to trigger JavaScript and talk about the content box of the input comment,
How does the front-end trigger the itemCommand event after html ??
1. After the comment box appears, hide the html and display the true. Comment button. It is a server-side control.
2. Add judgment before submission. If the comment box is hidden, display it. If it is displayed, submit it ....
If you want to use the brushless newest commit, you cannot use onrowcommand...

The Tabel label in the Repeater control in ASPNET adds a BUTTON control (a server control). How to add

You can add a repeater as a normal button, provided that the repeater needs to be re-built during postback. In other words, before executing the button event processing method, you need to re-bind the event processing method to the button. The button sending event is executed after the Load event, and you need to re-bind the button event before the Load or Load event.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.