In ASP.NET MVC, there are these snippets of html called view templates which appear when their matching data appears on the screen. For example, if you have a customer order and it has a vendor address, the vendor address view template shows up populated with data.
Unfortunately, these don't have access to "MasterPages" nor are aware o...
I have a class that extends the HtmlHelper in MVC and allows me to use the builder pattern to construct special output e.g.
<%=
Html.FieldBuilder<MyModel>(builder => {
builder.Field(model => model.PropertyOne);
builder.Field(model => model.PropertyTwo);
builder.Field(model => model.PropertyThree);
})
%>
...
Working in ASP.NET MVC 2.
I have a page that opens a Iframe.
On that IFrame I have a form. When I click submit I redirect to a controller.
How can I show the result of that controller on the parent page and not in the IFrame?
...
i am using asp.net mvc 2.0. in that i am using partial views but whenever i clicked on particular link i get the follwing error
404 Not Found
can any one konw the solution the application run properly at local host but it shows the error when i uploaded on the server. thanks.
...
I am having a hard time implementing "Remember Me" functionality in an MVC application with a custom principal. I have boiled it down to ASP.NET not retrieving the authentication cookie for me. I have included a snaphot below from Google Chrome.
Shows the results of Request.Cookies that is set within the controller action and placed in...
Hi all,
I've a small issue with URL generation & routing under ASP.NET MVC 2. My route has optional parameters and the URL is correctly generated if the parameters are specified.
Thus:
routes.MapRoute("Blog", "Articles/{tag}/{page}", new { controller = "Blog", action = "Index" });
with:
<%: Html.ActionLink(item.Tag, "Index", "Blog"...
This is obviously a security issue and probably do not want to change this, but it would be nice to handle the error. Any ideas?
I see that stackoverflow is not immune:
http://stackoverflow.com/questions/tagged/web.config
They seem to have changed the tag to web-config to fix the problem but you still get a very nasty error message wh...
Hi everybody, I'm developing an web application using asp.net mvc, and i need to do a stopwatch (chronometer) (with 30 seconds preprogrammed to start in a certain moment) on client-side using the time of the server, by the way, the client's clock can't be as the server's clock. So, i'm using Jquery to call the server by JSon and get the ...
I am trying to run the my asp.net mvc project on IIS 7 , I am trying to impersonate the user. Where Data is the data project of my application, i have added the dll reference to the asp.net mvc project
I tried giving full control to very one to this folder
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET File.
Any clue ...
I want to define a route that have 2 optional parameters in the middle of the URL the start an end parameters are digits
routes.MapRoute(
"",
"Source/Changeset/{start}/{end}/{*path}",
new {
controller = "Source",
action = "Changeset",
...
I have a ASP.NET Web App. I notice that while a simple ajax call(see below) is in process, web application does not respond to any action that I try on a different browser.
$.ajax({
type: "GET",
async: true,
url: "someurl",
dataType: "text",
cache: false,
success: function(msg){
...
I want all my views to inherit from a baseview data so I can set some shared properties that all my views will need.
Can I set some properties in OnExecuting so I don't have to do it for all Actions?
I want to then display the string value of the property in all my view pages.
If yes, how can I do this? I need to hook into the base v...
how will i integrate ckdeditor with asp.net mvc
...
Is there a way to set a persistent session that would not expire when closing/re-opening a browser. The cookie that is used to store the session_id expires when the browser is closed.
I know we can make the Auth persistent (stay logged in when we close and re-open a browser). In this case, the cookie does NOT expire when the browser is ...
To me, this seems to make little sense, but after reading the information in the following:
http://weblogs.asp.net/scottgu/archive/2010/02/05/asp-net-mvc-2-release-candidate-2-now-available.aspx
http://bradwilson.typepad.com/blog/2010/01/input-validation-vs-model-validation-in-aspnet-mvc.html
http://blog.stevensanderson.com/2010/02/19...
The routing I need is quite simple, I must be missing something there. As code example I put the simpler situation where I can reproduce my behavior.
You have this ActionMethod :
public ActionResult Index(string provider)
{
ViewData["Message"] = provider;
return View("Index");
}
And you have this route :
routes.MapRo...
I have my Model defined externally in two projects - a Core project and an Interface project.
I am opening the Add View dialogue from my controller, and selecting Create a strongly typed view.
In the drop down list, I can select the concrete types like MyProject.Model.Core.OrderDetails, but the interface types like MyProject.Model.Int...
I am trying to open a MVC 1.0 project compiled with the .net 4.0 framework in Expression 4. The solution opens fine, but there is no intellisense and when I run it, it shows an html browse page with the files listed. Any ideas on how to get Expression 4 to play nice with MVC?
Thanks
...
Is it possible to feed a single Master Page Content Placeholder from multiple areas in the child page? Something like a string builder?
...
Id like to have my mvc 2 app generating reports in both MS Word and PDF formats....currently working on Word. I found this:
http://www.revium.com.au/articles/sandbox/aspnet-mvc-convert-view-to-word-document/
Which i think basically streams the view output from a controller action to a word document....
public ActionResult DetailedRe...