20040828-Web Form User Control Example - User Control with Event

xiaoxiao2021-03-06  95

Today, the weather is good, there is a bit of autumn taste. I like autumn. But my head is a bit fainting.

Learn the web form user control, which can be highly reusable. It feels a bit a bit to include in the ASP. Write a control with an event.

The page code is as follows: BookList.aspx

<% @ Page language = "C #" debug = "true"%> <% @regiTer tagprefix = "acme" tagname = "booklist" src = "booklist.ascx"%> < Body>

User controls with events

Logic code is as follows: BookList.ascx

<% @ Control Language = "C #"%> <% @ Import name "%> <% @ import name"%> "system.data.sqlclient"%>