Hi I've an application with an admin section, for example a dropdown list is poopulated with cities but if the user was to delete some records through the UI, verify their actions in the dropdown and then decided they wanted to undo their change. What would be the best way to enable rollback functionality like this?
Set a boolean field [deleted] for each entity you want to rollback. Instead of actually deleting the records, you can just set deleted=true and then, if you want to rollback, set it to false again.
Of course you need to consider the deleted field in your select queries.
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.
I have a Web Application called FDP which is in .Net 2.0 and there are other 4 applications which are in classic asp. Now we are planning to convert all these 5 applications in to .Net 4.5. We need to use a common master page for all 5 of them I have already implemented and tested it with static data.
Now the other problem is we have some user controls in FDP we have to use on Master page eventually would be common for all 5 applications going forward. Now the problem is when I reference the ascx file in master page by using the Virtual Path, then as the master page is referenced in other applications as dll, this Virtual Path and ascx file is not available there. And the application is throwing error.
Is there any way to reference ascx file in master page as dll or accessing the ascx file of the master page dll in the other applications. And this ascx file has code to access some database and config values, which have to be coming from those other application.
Is it possible to implement this solution. Please give me some advice or any link which can support me. I am also doing my best for this implementation. Please any type of support if very helpful.
Could you please give more details?
- What is your first problem? You only described your situation, not what the problem is.
- As for the second, we need to know how you try to reference the user controls and which error is being thrown.
So it should include a prefix, these are the letters you'll use to use any control contained in the assembly(the dll)
the namespace is the namespace that contains the usercontrol
the assembly is the name of the dll file(most likely in your debug folder while testing) but without the dll extension added. No path should be required afaik.
The problem is we want to have only one common master file across the projects. For that I have solved it by using the master page dll concept as given here in this blog. () [^] But the problem is as I am accessing a dll of master page if I want to add a user control to it then its ascx file is not available when we reference its dll.
Then I came up with a solution to convert the user controls also into custom controls so that I can put them on the master page and access them.
Now for that I am getting the following error.
Error 86 Cannot use a leading .. to exit above the top directory. ASPNETCOMPILER 00 Core
And I have another doubt, that if I have any images and configuration values used in a customer control code, how should I deal with them? Can you please guide me or help me or send a link to me so that I can implement it in best possible way.
That code will work but that way of retrieving settings from Web.config is outdated/deprecated and may not work in future versions of .net.
This link is the recommended way of doing it, according to Microsoft: Microsoft Recommendation