开发者

Create user folders like userfolder/ticket and manage on a server in c#

I have one problem in a web server regarding the creation user folders and man开发者_Python百科agement. I have one page that users use to add the contents. During this add the user push one select button and add the content in one her folder like UserFolder/TheContent. I need to extend to use personalized folders using some item added by the user in the page and perform the creation of the personalised userfolder like Userfolder/uservalue_item/thecontent. My problem is that i need some ajax feature to pass the page uservalue_item to the add to folder feature. All samples are wellcome regarding creation and management of ticked userfolders and what to make if user quit without adding or validaing the page. Env : Windows based server, Asp.net,

Thanks, Romi


Well, the problem would be more easily solved in my opinion by emulating a file structure in your database. I'd have to look at your code to see how the user is uploading the data to the web server though. But I would use two seperate tables in a db with the following structure:

FoldersTable
{
    Id (Key),
    ParentFolderId (nullable if folder is root),
    UserId (ForeignKey, not nullable),
    FolderName 
}

ContentTable
{
    Id (Key),
    FolderId (foreign key to Foldertable),
    Content (binary blob field)
}

Furthermore, you could use two seperate functions: add_folder, and add_content. Extending that: remove_folder, move_folder, remove_content, etc.

I would not recommend you set it up exactly like that as I haven't taken time to analyze your current system requirements.

Hopefully I'm understanding your question correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜