One of the main criteria is for a "server control" to qualify as a server control, the class must inherit from System.Web.UI.Control class, directly or indirectly. Another main criteria for one to qualify as a server control is the ability to output some type of text into the HTTP request; either or all of the following:
o Client side scripts.
o Contain other server controls as children.
o HTML mark-up.
The image button web control user interface can be quite useful in the implementation is handled properly in c#.
The first consideration is to place the control on the active server page. In addition to other properties the runat property should be set to server. URL refers to the universal resource locator. This feature refers to locations on the World Wide Web. The World Wide Web includes internet and extranet web sites. Typically the image URL is populated to identify the location of the graphic image to display. The image is usually contained in a relative path however it may also be configured to a fully qualified URL.
Most of the built-in ASP.NET controls can post back to the server to create some changes. Let's take a button for an example - you can listen to the Click event and you will be notified when the button has been clicked by the user. But the event and code resides on the server
The code behind section needs to implement a proper on click event control manager. The communication between the active server page and the server is established with a unique name in both areas of concern. As an example the OnClick ASP property name and the method name is ImageButton1_click. When the user clicks the image control button the post back occurs at the server and the code contained in the method is executed.
This completes the round trip between the user, web page and the server. The process is fast and very efficient.
No comments:
Post a Comment