I am wondering if there is a way to make ASP.NET controls play nicely with my ASP.NET MVC app. Here is what I am doing.
I have an order page which displays info about a single Order object. The page will normally have a bunch of rows of data, each row representing an OrderItem object. Each row is an ASP.NET User Control. On the us...
If yes, when? and how much time do you think that the process will take to migrate your current projects (if it's the case)?
...
Greetings,
Apologies in advance that I have not researched this toughly enough to answer the question myself, but I imagine it would take me some time and I would rather know now before I invest more time in learning it. I couldn't find anything in my initial research..
Why use ASP.Net MVC if your already using a multi-tier architectu...
Hello,
I'm try to figure out how to handle the following scenario. In general, i have a bunch of records in a table. All of these have ID and ParentID fields to form a tree.
Page1
- Page2
- Page3
Page4
- Page5
-- Page6
Now, i want my routes for Page3 and Page6 to be like /Page1/Page6 and /Page3/Page5/Page6 respectivelly. That is,...
I have a controller with two actions:
[AcceptVerbs("GET")]
public ActionResult Add()
{
PrepareViewDataForAddAction();
return View();
}
[AcceptVerbs("POST")]
public ActionResult Add([GigBinderAttribute]Gig gig, FormCollection formCollection)
{
if (ViewData.ModelState.IsValid)
{
...
I've created
DataTable dt = new DataTable();
dt.Columns.Add("Type");
dt.Columns.Add("Address1");
dt.Columns.Add("Address2");
dt.Columns.Add("PostalCode");
dt.Columns.Add("Country");
DataRow drow = dt.NewRow();
drow["Type"] = ddlAddressType.SelectedItem.ToString();
...
I am trying to learn ASP.NET MVC and I hit this problem: I have a "view product details" form that I want to reuse as an add/edit form. (When you look at the product details, if you have the rights to do it an Edit link should appear; it should redisplay the same form, but with the textbox fields enabled this time.)
Right now the Detail...
I realize this is probably a very stupid question so sorry in advanced. I am trying to pass an XML list to a view but I am having trouble once I get to the view.
My controller:
public ActionResult Search(int isbdn)
{
ViewData["ISBN"] = isbdn;
string pathToXml= "http://isbndb.com/api/books.xml?access_key=DWD3TC34&am...
I'm using the MVC beta to write a simple application to understand ASP.Net MVC. The application is a simple photo/video sharing site with tagging. I'm working off the MVC skeleton project. I added some Html.ActionLink()'s to the navigation bar, but I'm having a problem with one of the Html.ActionLink()'s that I added in one spot.
I wa...
Made solution change: I am trying to display a html table of data.. In my controller I start an object as null and then pass the object as a reference to update the object based on the info in the DB like so "user control named(Indexcontrol.ascx)":
List<dataob> data = null;
dataManager target = new dataManager();
...
I'm writing a component that I would like to be able to use in both MVC and WebForms web apps, but I'm not sure how to handle the differences between how HttpContext is handled.
My component involves a custom IHttpHandler (for WebForms) or a custom ActionResult (for MVC).
So I've got a few questions:
Is there a way to use an IHttpHan...
I am looking at globalizing an application that I have developed in asp.net mvc.
I am currently using resource files to store messages that I present to the user (i.e., when I save something to the database, and the user is shown the message "The whatever was correctly saved", that text is stored in a resource file so that I can easily ...
I am currently playing around with the Asp.Net mvc framework and loving it compared to the classic asp.net way. One thing I am mooting is whether or not it is acceptable for a View to cause (indirectly) access to the database?
For example, I am using the controller to populate a custom data class with all the information I think the Vie...
I need some help with the follow:
I have just read on this tutorial:
http://www.asp.net/LEARN/mvc/tutorial-13-cs.aspx
and followed the example given for the "good solution". However, I encountered a problem after i made some modifications to the abstract class ApplicationController.
The original constructor was:
public ApplicationCo...
A developer I know just showed me FubuMVC and there was some question whether or not we should attempt to use it on a real live project or not. The current design choice so far has been ASP.NET MVC.
What I'm interested in finding out is:
What are the core differences between ASP.NET MVC and FubuMVC?
What are the gains/loses with eith...
How should I initiate a delete action from my view?
Creating a new form-tag for each entity just doesn't seem right :-)
<% foreach (var subscriber in group.Subscribers) { %>
<tr>
<td><%= subscriber.Email %></td>
<td><%= Html.ActionLink("[edit]", "edit", "subscriber", new {id=subscriber.SubscriberId}, nul...
I am a bit stuck on the design of my seo friendly urls for mvc....Take for example the following url:
http://myapp/venues/resturants.aspx?location=central&orderBy=top-rated
With my mvc app i have mapped it as follows:
http://myapp/venues/list/resturants/central/top-rated
{controller}/{action}/{category}/{location}/{order}
Now the o...
Hi, Anyone known how to polulate a combo with values that depends on the user seleccion, I have to combo, Country and Region, When the user select contry I need to go to the database and get the region of the country, Anyone knwows how to do this, if posibile using AJAX.
Thanks.
...
I was wondering the best practice for unit-testing controller actions that utilize model binding.
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult AddProduct(Product product)
{
}
I was wondering how you invoke the controller's method for unit testing. If you try something like this...
public void Catalog_AddProduct()
{
CatalogCo...
Is it considered better practice to post back to the same controller that did the rendering and redirecting from original controller if necessary? Or is it just the same if one jumps to different controllers from the view?
...