C# - Mock MVC Site, An Outline For Coders To See Functionality And To Start Coding?

Oct 20, 2010

I have to setup an MVC project to house all the HTML documents. This would be like a hierarchical structure using routing. The pages don't have to function, just act as placeholders. It's really just for the group to see all the HTML Pages to get an Idea of functionality. Then we would back fill groups of pages with the functionality by creating the controllers, model etc. How would this be best accomplished? Are there mock frameworks that could accomplish this? So it would be a project just having views, with a control ler that allows navigation between pages, simple to show mostly static HTML pages. The idea is simply for the group to see all the functionality, and to put together a structure to start coding. If possible we would like to see the correct URL based on the route table. What would be a quick solution for this while we work on the back end Object/Domain model?

View 1 Replies


Similar Messages:

Coding To Enable Site Users Upload Pictures To Classifieds Site?

Nov 23, 2010

I've been using an asp 3.0 widget for this purpose , but it been broken for a while and rather than get it back up, I'd love o get a native asp.net solution, can any one point me in the right direction pleaseI once wrote some asp.net code to do this, but the permissions on the server, which I found to be common every where prevented asp.net native picture upload, perhaps i got it wrong, well now I wanna fix itI need the code to work in a shared hosting IIS 7 environment. I use vb.net, but can usually convert c# to vb.net

View 1 Replies

Web Forms :: Add Application Help Functionality To .net Site?

Feb 8, 2010

I'm planning to add application help functionality to an asp.net site, with the following requirements:

1. Help links to be introduced throughout the application, either at the page level or next to a particular textbox, with a popup that will show guidance to users on how to use that page or what to enter in that textbox.

2. Content of these help popups to be managed by a designated end-user (not the site's developers).Currently we are using help popups that are programmed into the system and can only be changed through site upgrades.

View 1 Replies

C# - Common Functionality Recommendations For A Small-business Site?

Oct 20, 2010

where he sells paper products, as well as custom posters, banners, and the like. He doesn't have a website, so he's hired me to create one for him, where users can place orders, check the status of their order, etc.Other than his requirements, I'm trying to come up with other common functionalities that I should include in the site; things like a company blog, an admin section containing a simple CMS and error tracking/logging, a contact form, etc. Just common things that would be useful for a business site that he (or even I) might not think of

View 2 Replies

Start Batch Job From IIS / Start Exe File With System.Diagnostics.Process.Start With Another Account Is Disabled?

Oct 28, 2010

What is the right approach when users (authenticated domain admins) should be able to start batch jobs (usually exe files) from an IIS (7.x) aspx (c#) page? This is an intranet site. The batch jobs have to run on the web server as Domain Admins. The website pool is executed by network service or some similar restricted account in AD.

Approaches I can think of (and their disadvantages):
1. Start exe file with System.Diagnostics.Process.Start with another account. This feature is disabled in IIS 7.x, how do I allow it?

2. Create a sheduled task and call scheduled task-api. This unmanaged dll is giving VS compiler warnings because it's unsafe to call from managed code.

3. I suppose there's a better approach, because the previous suggestions doesn't appear safe or robust.

View 2 Replies

How To Set Start Page On Hosting Server After Uploading The .net Site

Jun 5, 2010

i have uploaded my site on hosting server with name www.selectionfurnishing.combut when i try to open any page i got an error that the site does not exits when i try www.selectionfurnishing.com/default.aspx then it gives error that the page does not exits (404)

View 2 Replies

WCF / ASMX :: Convert From C# Coding To VB Coding?

Apr 27, 2010

I manage to change part of it and the rest i not quite sure how to do it. Below is the code written in C#, it is a svc file.

[code]....

View 1 Replies

Web Forms :: WCL App / Red 'x' In The Upper Left Corner Of The Outline?

Jan 19, 2010

I am trying to develop an ASP.NET 2.0 (application which uses a Windows Control Library. I did some reading, tried to get something working, and ran into a problem. Basically, when the web application runs, I see an outline of where the WCL should be, but there is a red 'x', looks like a delete icon, in the upper left corner of the outline.

Then I found this article,
http://www.4guysfromrolla.com/articles/052604-1.aspx. I downloaded the code and when I ran it, without modification, I had the same problem. I also tried running the application from within VS 2005 (i.e., the projects recompiled) and I had the same problem.

View 7 Replies

Web Forms :: Background Color Not Contained With In Outline Or Grouping Text

Dec 20, 2010

I'm using panel controls because of the grouping text. I like the clean look this provides for this portion of my form. I don't like the way the panel control works though. I have both the height and the width set in the css file. I also set the background color. The grouping text is set in the mark up of the panel. The problem is that the background color is not contained with in the outline or the grouping text that the control creates. It goes beyond it. To test this I set a border to the panel in the css file. I then set the height and the width for this in the css. When this is viewed in the browser the outline created with the grouping text is no where near the size of the border I created. The border reflects the dimensions of the div. But, the outline of the grouping text and the grouping text itself is more the size of the contents. I assume this is normal for this control. Has anyone had this issue or know how to get around this? How do I get the background color to be with in the panels grouping text and it's outline? How do I get the panel to be the same as the size I set in the CSS?

View 1 Replies

Search Functionality In Site To Search Within Own Site?

Feb 20, 2010

I would like to have a search functionality in my site to search within my site. is it possible to have our own search engine.

View 2 Replies

MVC :: How To Mock Smtp

May 24, 2010

in one of my controllers, i have an action sending mail. I want to do a unit test on it.

How do i mock the smtp?

View 7 Replies

MVC 3 Building Dynamic Meta Keywords Meta Description Functionality For Multi-culture Site

Feb 10, 2011

create db driven meta keywords/description. I would store these records in a database, xml format i presume; since it would be per culture.How would i go about doing this?

View 4 Replies

Mock 3.5 To Unit Test Web Controls?

Feb 4, 2010

I want to mock ASP.NET 3.5 behavior in order to unit test my WebControls: I want to test how they perform with mock data with existing system of events. Basically I want to test generated result HTML based on input mock data. How to do it? I looked into NMock, but it doesn't suit my needs for 2 reasons:

It just runs ASP.NET server in separate process in order to get resulting HTML; My WebControls output HTML as a text on render, so there are elements which do not correspond to any ASP.NET control (except LiteralControl in some cases). Also, I have huge legacy system, so rewriting everything for MVC won't work for me (too much job), I need to write unit tests to existing controls.

View 1 Replies

Unit Testing - How To Mock A Model In MVC

Nov 11, 2010

I've made a custom model, and I want to mock it. I'm fairly new to MVC, and very new to unit testing. Most approaches I've seen create an interface for the class and then make a mock that implements the same interface. However I can't seem to get this to work when actually passing the interface into the View. Cue "simplified" example:

[code]...

Upon a HttpPost I get a "Cannot create an instance of an interface" exception. I seems that I can't have my cake (passing a model) and eat it (pass mock for unit testing). Maybe there's a better approach to unit testing models bound to views?

View 3 Replies

Creating A Mock URL Referrer In MVC For Unit Testing?

Feb 10, 2010

I'm currently testing my application and am stuck on trying to figure out how to create a custom fake URL referrer. I've tried to hard code it, but am getting an error that it is read-only. Here is what I've tried so far:

fakeController.HttpContext.Request.UrlReferrer.AbsolutePath = "http://www.yahoo.com";
as well as,
fakeController.Request.UrlReferrer = "http://www.yahoo.com";

I've searched the web for some ideas on how to create a fake/mock URL referrer for my fake controller, but have had no luck.

Note: I'm using Visual Studios built-in unit testing facilities.

UPDATE:

I would be more than willing to use any other unit testing system outside of Visual Studio, unfortunately here at my work we are only allowed to use Visual Studio's built-in system, so I gotta work with what I've got.

View 3 Replies

Unit Testing / Mocking HttpContext Without Using Any Mock Framework

Sep 7, 2010

Since I'm having problem with unit testing RenderPartialViewToString() with Moq framework [URL] I'm thinking about getting my controller directly, without using Moq for these particular test, however, how do I mocks (or set) the HttpContext for my test without using any Moq framework?

I need to able to do something similar to this, without Moq of course:

var mockHttpContext = new Mock<ControllerContext>();
mockHttpContext.SetupGet(p => p.HttpContext.User.Identity.Name).Returns("n1\test");
mockHttpContext.SetupGet(p => p.HttpContext.Request.IsAuthenticated).Returns(true);

View 2 Replies

Architecture :: Unit Testing Delegates With Mock Framework?

Apr 3, 2011

I'm using the mock framework to unit test some methods. I came across some methods that use delegates. I did not find a way to setup these delegates to return the objects that I want. The mock framework does not support it as far as I know. Is this supported in other mock frameworks like nMock?

View 3 Replies

Mock Server.HtmlEncode - Returns Null Reference?

Nov 16, 2010

I'm trying to mock Server.HtmlEncode(), but I keep having a null reference exception.I'm pretty new to the Moq framework, here is my code:

var context = new Mock<HttpContextBase>();
var request = new Mock<HttpRequestBase>();
var response = new Mock<HttpResponseBase>();
var session = new Mock<HttpSessionStateBase>();
var server = new Mock<HttpServerUtilityBase>();
server.Setup(svr => svr.HtmlEncode(It.IsAny<string>())).Returns((string s) => s);
context.Setup(ctx => ctx.Request).Returns(request.Object);
context.Setup(ctx => ctx.Response).Returns(response.Object);
context.Setup(ctx => ctx.Session).Returns(session.Object);
context.Setup(ctx => ctx.Server).Returns(server.Object);

I've also tried the following:

context.Setup(ctx => ctx.Server.HtmlEncode(It.IsAny<string>())).Returns((string s) => s);

I've found a solution but it seems an outdated solution as expect is replaced with setup.

View 2 Replies

AJAX :: Outline Doesn't Appear Around The Validator Callout Extender's Callout

Aug 24, 2010

For some reaon the black outline isn't appearing around my Validator Callout Extender's callout box. I don't have a css class set. It should display a yellow callout with a black outline. Like on the sample page:

[URL]

It shows the yellow call out with the black outline around the pointed part but not the main box.

View 1 Replies

C# - Registering Routes On Session Start Not Application Start?

Jan 26, 2011

I am trying to register the route collection in .net based on each session. The code I have works fine, you goto website/username and it loads the correct sub pages, but you have to restart the application to goto website/username2 to load those sub pages. But when the application is restarted the second one works, but then not the first one. Is there some way to create a different route collection per session not per application using system.web.routing.

View 3 Replies

C# - Start Timer On Web Application Start

Jun 8, 2010

I would like to start a System.Threading.Timer in my application when it launches (maybe deploy is the correct word). I have seen that you can use Application_Start() but this is only fired once the first request comes to the application. I need the timer to start as soon as the application is running so that it can check for work to process even if a user is not interacting with the site. How can I get the application to start the timer once it is up and running?

View 4 Replies

Iis7 - Unable To Start Debugging On The Web Server - Couldn't Start Debugging VS 2010 - II7 - Win 7 X64

Jan 11, 2011

I am running Visual Studio 2010 (as Admin), IIS 7 on Windows 7 x64. I am able to run the ASP.NET web site in IIS 7 without debugging just fine, but when I press F5 to debug it, I get: Unable to start debugging on the web server. Could not start ASP.NET debugging. More information may be available by starting the project without debugging. Unfortunately the help link is not helping me much and leads down a heck of a large tree of things. I checked the following:

Security requirements — I don't recall having to do anything special before. The worker process in IIS7 is w3wp.exe. It says that if it's running as ASPNET or NETWORK SERVICE I must have Administrator privileges to debug it. How do I find out if I need to change something here? Web site Property Pages > Start Options > Debuggers > ASP.NET is checked. Use custom server is set to the URL of the site (which works fine without debugging). Debugging is enabled in web.config. Application is using ASP.NET 3.5 (I want to move to 4.0 eventually but I have some migration to deal with). Application pool: Classing .NET AppPool (also tried DefaultAppPool). Surely it shouldn't be that hard to install IIS, VS, create a web site, and start testing it?

View 2 Replies

Force A New Start Of "Cassini" When Start Debugging A New Instance Of Web Application?

Feb 25, 2011

In our ASP.NET application we perform some initializations upon the Application Start event.When the application is started in visual Studio 2010 with 'Debug->Start new instance' the ASP.NET Development server does not start new, and my Application's Start event is not fired.My workaround is to manually stop the development server - is there a setting to force this automatically?

View 1 Replies

How To Improve Coding

May 7, 2010

how can i do perfect coding using all oops concepts?

View 6 Replies

Do Alt+tab Fuctionality In The C# Coding?

Jul 21, 2010

I Developing a erp project in that there are more than 100 screens i should provide a one button or any other option if users click that button it show all screens so far you have used for eg:alt+tab event if we press it comes so far used same functionality should be overcome in my project how to achieve this.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved