In my .Net MVC app using twitter bootstrap, I have a View that draws many fields. The value of each field is a shortened string 100 characters long. The original string is always over 1000 characters long (sometimes 100k characters long).
string long = result[i]; // really long string that's over 1000 characters long
string short = long.Substring(0, 99);
<section>
<div class="row-fluid">
<div class="span12">@short</div>
</div>
</section>
For each field that I draw, I need to have a link that the user can click to show a modal window in which I display the non shortened text.
So I may want to have 100 links to modal windows on the same page and each modal window will display its own text.
Something like this: http://jqueryui.com/dialog/
But my problems are:
1) I will have a lot of modal dialogs on the same page, so I guess I'll need an unique ID for each one.
2) I will have to pass the long text ("string long") to each modal dialog. Maybe I can do that when I draw them in the client code, or maybe I can do that by sending the long text to my Controller. I'm not sure what the best approach would be.
I have been looking at this: ASP.NET MVC modal dialog/popup best practice but I don't quite understand what the checked answer is referring to ("Lunchy's dialog suggestion"?).