Hi guys,
I am having trouble with MVC here in that a page displays wrong.
Using Visual Web Developer Express 2010, calling the page from my Index page - which looks just fine - by calling an action on home controller which in turn returns the view. Normal, right?
The wrongly displayed page uses lots of C# code, two dynamically created tables with a form button at the end of each row and some functions if a button was pressed.
I am quite certain I am still thinking too much like standard ASP in that case but it should be working nonetheless.
Actually, it does work - but my header appears at the bottom of the page.
The very top of the page code looks like that of every other page:
There is only one _Layout page and one css for all pages.
Funnily, when I look at the source code of the rendered page, the page code begins not with the featured section but with my first "Response.Write" output, while the head block...
...with stylesheet reference, header, navigation, body with featured section and footer come at the end of the file.
Yep, even the freaking body tag comes at the end of the file, after all my body content has been rendered above!
Anybody else experienced such a thing?
Thanks!
MakeItSo
“Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family.” (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.
I am having trouble with MVC here in that a page displays wrong.
Using Visual Web Developer Express 2010, calling the page from my Index page - which looks just fine - by calling an action on home controller which in turn returns the view. Normal, right?
The wrongly displayed page uses lots of C# code, two dynamically created tables with a form button at the end of each row and some functions if a button was pressed.
I am quite certain I am still thinking too much like standard ASP in that case but it should be working nonetheless.
Actually, it does work - but my header appears at the bottom of the page.
The very top of the page code looks like that of every other page:
Code:
@{
ViewBag.Title = "bla yadda yadda";
}
@section featured {
<section class="featured">
<div class="content-wrapper">
<hgroup class="title">
<h1>@ViewBag.Title</h1>
<br/>
<h2>@ViewBag.Message</h2>
</hgroup>
</div>
</section>
}
@using System.Data
...
...
There is only one _Layout page and one css for all pages.
Funnily, when I look at the source code of the rendered page, the page code begins not with the featured section but with my first "Response.Write" output, while the head block...
Code:
<!DOCTYPE html>
<html lang="de">
<head>
...
...
Yep, even the freaking body tag comes at the end of the file, after all my body content has been rendered above!
Anybody else experienced such a thing?
Thanks!
MakeItSo
“Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family.” (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.