Spark T4 templates for ASP.NET MVC
I was just curious if any Spark T4 templates already exist that match/are similar to the out of the box web forms view templates (create, edit, details, etc...). My Google skills didn't lead me to any results. ...
I was just curious if any Spark T4 templates already exist that match/are similar to the out of the box web forms view templates (create, edit, details, etc...). My Google skills didn't lead me to any results. ...
Is there a way to organize the roles in my app like a tree? You know, User can do several things, Moderator is just like user but can do little more, Administator have even more abilitities, etc. I've found nothing in the "Web Site Administration Tool". ...
Does anyone else think that the add view dialog in VS is useless or is it just me? Why is there no search/filtering in there? I can not even paste the type name (without namespace) there to speed up the view creation. Plus, there are a lot of irrelevant classes there, including classes from all referenced libraries. Am I missing somet...
Consider this MapRoute: MapRoute( "ResultFormat", "{controller}/{action}/{id}.{resultFormat}", new { controller = "Home", action = "Index", id = 0, resultFormat = "json" } ); And it's controller method: public ActionResult Index(Int32 id, String resultFormat) { var dc = new Models.DataContext(); var messages = fr...
I'm looking to create a top-level horizontal menu, with a second-level horizontal menu below it. Clicking on the top level menu causes the second level menu to change, based on the top level one. clicking on a second level menu causes the content of the page to change. (BTW - I'm looking to do all this in ASP.NET MVC, so if you have any...
This is part of my spark partial view (it is called TaskSearch): ${ Html.DropDownList("Search.Status", Model.Statuses, "All") } it is generated by non-spark view with code: <% Html.RenderPartial(ControllerActions.TaskSearch, ViewData["TaskSearchModel"]); %> Spark generates view class that contains Output.Write(H( Html.DropDownList...
I use RequireSsl attribute to redirect to a https url if an action is decorated with it. RequireSsl I now need a good way to link back to url that dont use https. This post explains my problem in clear english: link to http I am not shure what the easiest way is. In old school ASP.NET I used secureWebPages on codeproject. To be hones...
i have been developed my last project like below as by last architecture View -> Controller -> Service Code -> Repository with DDD(Model) Now i want to use WF and WCF?where are they to be on my last architecture?please tell me show me an example. ...
In our web project we have added Extension methods in a folder \Code\Extensions\DateTimeExtension.cs containing an extension method called FromUtcToUserTimeZone() We use the spark view engine in asp.net mvc and want it to work on medium trust there for we need to make a pre compilation of the views. When the post build event runs I...
I'd like to use LiveID on an ASP.NET MVC site. Should I still use the ASP.NET Membership provider? How about the default MVC Account controller? I have things working without either, but: Using the Membership controller lets me see when a user last logged in. Using the Account controller makes setting authentication cookies a bit ea...
Hi, I want to take a look at my views with reflextor, I have set my project to compile views <MvcBuildViews>true</MvcBuildViews> But when opening the DLL for my application in reflextor I do not see the views... I see the controllers and models but no views... Have I not compiled the views correctly? or is there more to it? Thanks...
Hello I have this in my code: SelectList(blah, "blah", "blah", cu.Customer.CustomerID.ToString()) It gives a error when it returns null, how can I make it CustomerID is an empty string if it is null? /M ...
I have a file DownloadResult.cs extended from ActionResult(actually cloned from Phil Haack's one, which u can find at the following location Phil's blog ) Here how do i handle an exception(file not found ) thrown from the method ExecuteResult() in the controller level . for the source code you might want to look at Phil's code , whic...
We have an ASP.NET MVC application for which we have developed our own custom RoleProvider class. Without caching it will access the datastore for every request - bad. The only caching option we can find is (in web.config) via cookies stored on the clients' machines. My two questions are: Is this secure (even with encryption enabled)? ...
I've got a few controllers here at work that contain methods I can use in other controllers. I considered moving out some of the common functionality to a base controller which these could then inherit from. The problem with this is that I’d have methods I need in multiple base controls which I’d not be able to access. (Because we can't...
Should a Controller ever need to call a Repository directly, or should it always run though the service layer? Or are there other options? ...
I have a MVC website that was working fine on one dev machine. I moved it to a new dev machine and navigation to anything but the default index fails with a resource not found error. I've set breakpoints in all the controllers and nothing is being hit. Both machines are .net 3.5 sp1, MVC v1.0. The original dev machine was XP, the new...
I have an asp.net MVC application that takes in uploaded NMEA track files from small GPS loggers. In some cases, the loggers will inject null (0x0) values into the track file text. Is there a way to strip out these 0x0 characters from the HttpPostedFile's InputStream before saving the file to the server's file system for processing? A...
Hello everybody. Six months ago I wrote a OpenID library. It is trying to authenticate with some open Id and if that is verified by provider, it raises OpenIdValidationSuccess event. I was using some event handlers to handle this events from the page. OpenMedia.Auth oAuth = new oAuth(); In my Page Load protected void Page_Load(objec...
How can I minimize the footprint of a website built using MVC. My application currently runs at around 20mb, I'd like to reduce it if possible. Edit: I've switched hosts, problem solved. ...