Different relationships between common field events and results and field events
In ASP. NET development, we may need to add, search, or update a common field. In addition, the buttons are separated independently. The event processing result is different. In this way, the relationship and results between them need to be coordinated in An ASPX webpage.
Some netizens asked similar questions on the Internet:
Insus. NET uses this as a small case and provides a simple demonstration for your reference. Prepare the database first:
SQL source:
Create table [T1] ([col1] NVARCHAR (50), [col2] NVARCHAR (50) gocreate procedure [dbo]. [usp_T1_Insert] (@ col1 NVARCHAR (50), @ col2 NVARCHAR (50) asinsert into [dbo]. [T1] ([col1], [col2]) VALUES (@ col1, @ col2) gocreate procedure [dbo]. [usp_T1_GetAll] ASSELECT [col1], [col2] FROM [dbo]. [T1] gocreate procedure [dbo]. [usp_T1_Search] (@ col1 NVARCHAR (50), @ col2 NVARCHAR (50) ASSELECT [col1], [col2] FROM [dbo]. [T1] WHERE [col1] LIKE '%' + @ col1 + '%' AND [col2] LIKE '%' + @ col2 + '%' GOView Code
Prepare files or interfaces on the website in the following order:
Demo:
Weibo will focus on and simplify it, and the code will not be posted one by one. You can download it directly from the following link:
Http://download.cnblogs.com/insus/ASPDOTNET/DyFieldAspxUcInterface.rar
In this blog, you will learn about the collaboration between aspx and the user control ascx, how to perform static loading, and dynamic loading, how to set attributes, assign values, and obtain values. How to handle the value assignment of dynamic loading is obtained by the application during asp.net development. In addition, interfaces play an important role among multiple controls.