Click here to Skip to main content
14,550,374 members
Rate this:
Please Sign up or sign in to vote.
See more:
I managed to create using jQuery, some sticky notes to my asp.net webpage, with the "common" features: add, deleted, edit, reside (...)

I'm proud of my work but now I have two problems I'm not really sure how to solve, I have appreciate your help. Problems are:

- How should I store notes information (content and position). XML or MSSQL? For option 2, is it even possible?

- In the default page, I use a div tag
 <br />
div id="notes" style="width:800px;height:500px;">    <br />
<script type="text/javascript" etc... 



but I would like to "navigate" my sticky notes by the whole webpage. The way I did Is not very usefull. Can I do that?

Thanks in advance.
Posted
Updated 13-Dec-10 7:01am
v5
Comments
LloydA111 13-Dec-10 16:31pm
   
Would you even need XML or SQL? Seems a bit overkill unless your already using a DB in which case it probably is easier to use it to save position settings.
Not Active 13-Dec-10 18:03pm
   
How would you persist the location and text for the notes without using XML or SQL?
Maxdd 7 13-Dec-10 18:42pm
   
Why would I need XML or SQL? What's the alternative? I need to save data because I use SQL DB with user's ID, and I need to assign every sticky note to the user ID, so every time a user login, he gets its stickys notes with the same content and position.
Not Active 13-Dec-10 19:45pm
   
The question was directed at the previous comment from Lloyd Atkinson. I'd like to know how he would do it without a persistence mechanism
Maxdd 7 14-Dec-10 6:41am
   
Yes I know, I would like to know that too.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

I'm assuming you don't put a limit on the number of notes that a user can create. In which case since it grow very large then a database would be the best choice.

Not sure what you mean by; "navigate" my sticky notes by the whole webpage
   
Comments
Maxdd 7 13-Dec-10 18:39pm
   
Is really possible to integrate c# inside javascript functions? because every time I create/edit a sticky note (the code is on .js) I dont know if/how I can integrate the sql query procedure. The same problem I face with XML, because I dont know how to integrate c# code in my .js functions (i'm really new to javascript and c#, so please forgive my ignorance).

My navigation I mean: when I specify that div tag in the <body> of html, I specify a rectangle where sticky notes can be moved, and so on I'm limited that way (I cant integrate for example a login asp component inside that div tag). I hope I'm being cleary enough to understand my question.

Mark, I really dont know how to persist that info without using XML or SQL, still hoping for a guidance.

Thanks again.
Not Active 13-Dec-10 19:51pm
   
You can't integrate C# inside JavaScript. The former is on the server-side, the latter on the client-side. What you can do is call a C# method from your JavaScript using AJAX.

The notes, IMO, should be floating divs so the use can place them anywhere on the page they would like. See this example: http://jqueryui.com/demos/draggable/
Maxdd 7 14-Dec-10 6:40am
   
Thanks Mark,

I'll search for the info, thank for help.
Member 13045318 3-Apr-17 7:44am
   
sss

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100