c# - Using generic types with an asp.net user control -


The second day I created a user control that dynamically creates a data display from a custom custom object.

It works well, but I would like to use control in other applications and the way in which it is currently explained, it is all equal.

In my custom user control, there are just basic HTML controls and some internal properties so I can use them from my second class.

In the same assembly, I have a class data manager - it has a reference to an IMEmable and its related user control. The problem is that I have to handle the details of the implementation such as printing the page on the page_ant by calling the page, because there is no knowledge of T in the real user control.

Is there a way for the user to control a common type of things, or to specify the data, to store the context of the datamigrator object?

Thank you for your help! Here are some ideas, ideas:

But the challenges are facing because you have tightly connected data access (presentation of data) and presentation of your application (user control).

Perhaps you should change your goal to deconnect your presentation from your object and data layer to your presentation level.

Some tips that can help you achieve this include: 1) User control that keeps data and sets this property in Page Load or Page Init. If you fight the page lively, since the page page loads the control page, create your own bind message on your custom user, with control and data, call it after setting user control property 2) Users Look at the interface or model for the data being given in the control and use it as the type of property that holds your data - you type Can be normal but I'm struggling to think about a user control which will work with any business object, I can dream, so it seems like a bad idea 3) Despite the implementation, Your Datamenager tells you what you want to change in terms of user control. An object named DataMenger should have the same responsibility and it should get the data and there should be no knowledge of the user's control or the presentation of your application

I hope this will be helpful only a people opinion , Best wishes


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -