Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi. i want to use this http://www.erichynds.com/examples/jquery-notify/[^]plugin on my asp.net application. I am serializing my title and text serverside with javascriptserializer class. and i have no problem to show it. but my challenge is : i am loading titles and Contents of notifies from database. i have no problem with load and selecting from Database. i want to refresh notifies on every page load for user. for example 4 row added to Notification Table on database. how can i serialize 4 valuable and binding it to Source and title property of JQUERY notification plugin and displaying 4 notifier to user dynamically ? for 1 valuable that i want to bind to a jquery property plugin i am using this code snippet:
JavaScriptSerializer serializer = new JavaScriptSerializer();

string jsArray = serializer.Serialize(my public Variable that is binded to Jquery plugin);

i am binding public c# valuable to jquery plugin in this type :
title : <%=C# Variable%>

how can i use this method to displaying notifiers to user dynamically? is there any better method? i want to show notifies on all pages. have i to put codes on Basepage? English Is not my frist language . Does my question Clear? thanks all thanks all.
Posted
Updated 30-Aug-10 8:22am
v2

1 solution

title should be a string, so it needs to be surrounded by quotes and the content of your C# variable needs to be escaped:
title: "<%=myString.Replace("\"", "\\\"")%>"
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900