I'm working on displaying some text in a textarea that I've submitted via a form in my ASP.NET MVC app.
I want the line breaks to show when I'm displaying the text back.
Why does
Message.Replace(Environment.NewLine, "<br />")
not work, but
Message.Replace("\n", "<br />")
does?
Is the breakline character that the browser submi...
I have an mvc site with two projects. One is the site itself and then a second project contains controls which are content only. The reason for this is that the control project is for elements that live in a cms. When I am running it locally in dev studio, I would like to be able to load these controls without setting up iis.
Is ther...
The title says it all.
If I have an instance of ActionExecutingContext how might I get the MethodInfo of the
action in question?
...
Is there JavaScript grid component where in read-only mode I would be able to select somehow several rows ( e.g. shift or ctrl with mouse click ) and track/process selected rows.
...
I have been looking around but i don't see any spec for this, maybe i search a wrong keyword. But i'm here so i should ask something.. :)
I'm familiar with Authorize Attribute, but I think it only apply to Actions. What should i do if i want my whole application to authorize first before getting access to any actions?
It will be very p...
I'm looking into microsoft's version of MVC as a framework for a site redesign that I'm about to begin.
I am not totally new to MVC, I worked on a java app using MVC. We used the DOJO javascript library to make asynchronous calls back to the actions to update views.
What are some of my choices to do the same in .net MVC?
I'd like...
Both have Request and Response properties, but I can't write a method that takes either HttpContext or HttpContextBase. In some places either one or the other is available so I need to handle both. I know HttpContextWrapper can convert in one direction, but still... why is it like this?
...
ok i use this route
routes.MapRoute(
"Catalog/Data",
"Catalog/{*data}",
new { controller = "Catalog", action = "Category", data = "" }
);
the Url looks something like http://localhost/Catalog/Computer/Harddrives/internal
Data beening the Computer/Harddrives/internal part
i split it apa...
I have a problem in my asp.net MVC application.
I have a wrapper class for PL/SQL package. And I have to save screen changes to database through package call. While the process its not throwing any exception or error.
How do I debug the package to find where the problem is?
Please help me.
...
I have an action that returns ViewResult (it's a detail form, public ViewResult AddFoo(long id) and I need to display this result in a lightbox
My first idea was to generate a div with an iframe, but than I don't know how am I going to close (hide the div) this lightbox on submit
Other thing that I could do is take somehow the generate...
Has anyone managed to get nhibernate.search (Lucene) to work with S#arp Architecture? I think I have it all wired up correctly except Luke shows no records or indexes when I run my indexing method. The index files for the entity are created (segments.gen & segments_1) but both are 1kb in size which explains why Luke shows no data.
I e...
I have a model (entity class) Newsletter. I pass a list of Newsletter to a View and display the list of Newsletter in a table with each Newsletter across a row. Besides each Newsletter row, there is a checkbox. I will select the Newsletters that I want to send by checking the checkbox and clicking on a send button.
How can I pass the...
Hello,
On my page I have toolbar which comes from Masterpage, and some input fields.
All input fields are inside of tag form and toolbar outside tag form.
Is it possible submit form after pressing on button outside of form tag?
Please suggest,
Alexander.
...
I have two questions:
I'm wondering how I can display no link text when using Html.ActionLink() in an MVC view (actually, this is Site.Master).
There is not an overloaded version that does not allow link text, and when I try passing in just a blank string, the compiler tells me it needs a non-empty string.
How can I fix this?
I ...
I am running into a problem trying to use AJAX and jQuery with ASP.NET MVC on IIS 6.0. I receive a 403.1 error when I attempt to invoke an action via jQuery. Is there anything I must add to the web.config in order to support this?
Client Code
<script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../...
Earlier I created an AddClient page that (when posted) passed a client object and I used db.AddToClient(obj) in my repository to persist it. Easy stuff.
Now, I have a details page whose save submits a post to an action "UpdateClient". Before that action is hit, my custom model binder creates my Client object and it's conveniently hand...
I have a site that serves up a pretty substantial Silverlight RIA and it makes use of IsolatedStorage. The SL app is served up from https://www.site.com/Application (MVC View that hosts the SL object tags, etc). It is also served up from https://site.com/Application. The problem inherent in this is that this will create two separate I...
Hi,
I'm using ASP.NET MVC and I am trying to use a dictionary as a property in a ViewModel over which i want to iterate in the view and dynamically generate checkboxes for each key-value-pair in the Dictionary. I can successfully get the checkboxes to be generated with the correct values for the "value" attribute but i'm having trouble ...
Hi,
For some reason, the following line does nothing in my ASP.NET MVC project:
System.Diagnostics.Debug.Assert(false);
I have triple-checked that I am using the Debug configuration and "Define Debug constant" is checked in the Debug configuration settings.
The same problem also occurs in my unit test project.
Implementing my o...
Please excuse the confusing title ;)
We've built an ASP.NET MVC application to replace our "old" ASP.NET webforms monster. We still want to support some of the old URLs used there, because these may still float around in E-Mails etc. somewhere out there.
For example: Our old system used the URL ~/Password.aspx, the URL in the new MVC s...