erichexter / twitter.bootstrap.mvc

nuget package to make bootstrap easy with mvc4
Apache License 2.0
248 stars 134 forks source link

BootstrapBaseController can't handle multiple alerts #87

Open roryprimrose opened 11 years ago

roryprimrose commented 11 years ago

An exception is thrown if any of the functions in this controller are invoked more than once because the key already exists in the dictionary.

The other issue here is that because of this, the TempData support for alerts only supports single messages. An alternative would be to add a collection as the value of the TempData dictionary rather than just string. The _alerts partial view could then enumerate the collection to render multiple alerts.

erichexter commented 11 years ago

The initial impl is basic and i agree with your proposal. On Mar 21, 2013 8:20 PM, "roryprimrose" notifications@github.com wrote:

An exception is thrown if any of the functions in this controller are invoked more than once because the key already exists in the dictionary.

The other issue here is that because of this, the TempData support for alerts only supports single messages. An alternative would be to add a collection as the value of the TempData dictionary rather than just string. The _alerts partial view could then enumerate the collection to render multiple alerts.

— Reply to this email directly or view it on GitHubhttps://github.com/erichexter/twitter.bootstrap.mvc/issues/87 .

serra commented 11 years ago

:+1: Please also take #86 into account; and where possible keep the api backwards compatible for those who will do an occasional Update-Package twitter.bootstrap.mvc4.