ASP.net technical test

Associate
Joined
1 May 2007
Posts
1,901
Location
London
I have been sent an 'asp.net technical test' to do. Basically they provide the front end code and I just need to code the logic/back-end stuff. Fine, sounds easy enough.

So I finally get round to opening up the files they sent me and they have provided me with the following.

2 folders - images & css. I'm used to seeing that, so that's fine.

3 htm files. errr what? I was expecting some aspx pages with the html on.

I'm not asking anyone to help with the code, but how do I go about starting to solve this test? I was tempted to just copy the htm files into aspx pages and then stick my server logic in the code behind. But I have a feeling they dont want me to do that.

Or should I be using the htm files and registering a namespace at the top? e.g.

Code:
< % @ Register TagPrefix="CoreControls" Namespace="MyControls.CoreControls" Assembly="MyControls.KGCoreControls" % >

They are expecting a project they can open in VS 2008 and browse using built in server.
 
You will have to get the html content into aspx pages somehow, no one can expect you to add "logic/back-end stuff" to static html without transferring it to either a WebForm or a View unless you implement everything in javascript.

I'd create a MVC project and make views where you can just copy-paste the html straight in so you can keep them close to the originals and don't have fiddle around with it. Then just add the logic one controller action at a time. It'll probably save a bit of fiddling with the CSS that never quite fits the WebForms markup as well.
 
Cheers Goofball. I havent done any MVC before but I watched a video yesterday and it looked pretty straightforward so will prob go down this route.
 
MVC is definately a good thing to know.

I would suggest that you create a master page (assuming the html pages all follow a similar layout) and partial views to hold common page items.
 
This is just standard stuff in the web design world. I'm speaking from a back-end developer point of view.

We had little teams of designers and programmers. While the programmers worked on existing projects. The designers would do the front-end design for new projects and get it all signed off.

It was then handed over to the programming teams as a bunch of CSS, images and HTML files. This meant we changed the .htm files into .aspx as we started to work on the back-end stuff. Then we deployed it to a local testing server.
 
They have provided html for 3 pages - start, game and score. The pages are identical except for overlays on the start and score pages, so I reckon a master page with views is definitely the way to go.

Can MVC make use of Ajax/partial postbacks?
 
Can MVC make use of Ajax/partial postbacks?
Yes, I find it's actually one of the strengths of the framework as you're essentially working with html, not asp, in the views. So all the ajax stuff in jQuery (and probably others?) work very smoothly and are easy to create once you've done a view or two. There's also Json serialization built into the basic controller class so you can pass any object (even anonymous ones) to your client, straight into the javascripts without any visible marshalling.
 
Last edited:
Back
Top Bottom